Mario Parra Mario Parra - 1 year ago 174
Apache Configuration Question

.conf file to redirect naked domain to page

I have a Craft CMS site, which has generated a specific page–let's call it ""–and I want to edit a .conf file for a new domain to redirect straight to this page.

Thing is that since it's not a flat file, I can't use

to point directly to it in the server, so I've used
Redirect permanent
, but I'm not sure if that'll work at intended:

<VirtualHost *:80>

Redirect permanent /

CustomLog /var/log/httpd/ combined
ErrorLog /var/log/httpd/


Is this correct?

Answer Source

The correct way:

Redirect permanent /
  1. Always include the scheme (http/https)
  2. Always match slashes in source and target.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download