apache - .conf file to redirect naked domain to page -
i have craft cms site, has generated specific page–let's call "domain.com/page-x"–and want edit .conf file new domain redirect domain2.com straight page.
thing since it's not flat file, can't use documentroot point directly in server, i've used redirect permanent, i'm not sure if that'll work @ intended:
<virtualhost *:80> servername domain2.com serveralias www.domain2.com redirect permanent / domain.com/page-x customlog /var/log/httpd/website.lc-access.log combined errorlog /var/log/httpd/website.lc-error.log </virtualhost> is correct?
the correct way:
redirect permanent / http://domain.com/page-x/ - always include scheme (http/https)
- always match slashes in source , target.
Comments
Post a Comment