: Why doesn't htaccess redirect domain alias to a specific url? I have this which i can't get to work RewriteEngine On RewriteCond %{HTTP_HOST} ^domainalias.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domainalias.com$
I have this which i can't get to work
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domainalias.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domainalias.com$
RewriteRule ^(.*)$ www.maindomain.com/specific-url/ [R=301,L]
it doesn't redirect to /specific-url/
any ideas?
More posts by @Kevin317
1 Comments
Sorted by latest first Latest Oldest Best
If you're looking to redirect a user from an old domain to a new domain on a specific page, you can use this:
======= update ========
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?domainalias.com [NC]
RewriteRule ^(.*)$ maindomain.com/specific-url/ [R,L]
or
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domainalias.com$ [NC]
RewriteRule ^(.*)$ www.maindomain.com/specific-url/ [R=301,L]
========= ### =========
You can also redirect using a meta tag:
<meta http-equiv="refresh" content="0; url=http://www.example.org/newpage.html">
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.