: Mod rewrite help needed to redirect old domain to new domain I recently switched sites from janeullah.com (which had an A dns entry pointing to janeullah.zenfolio.com) to janeullahphotography.com.
I recently switched sites from janeullah.com (which had an A dns entry pointing to janeullah.zenfolio.com) to janeullahphotography.com. I'm on Dreamhost, currently have A record on janeullah.com going to blog.janeullah.com and using Google Apps for Email.
I'm trying to set up a rewrite rule which (for now) redirects anyone who clicks on janeullah.com/xxxx/xxx or janeullah.com/z/s/z to:
janeullahphotography.com/xxx/xxx or janeullah.com/z/s/z
These are the .htaccess contents I've tried that didn't redirect
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) janeullahphotography.com/ [R=301,L]
and
RewriteEngine on
RewriteCond %{HTTP_HOST} !^janeullah.com$ [NC]
RewriteRule ^(.*)$ janeullahphotography.com/ [R=301,L]
Typing in janeullah.com/weddings doesn't redirect to janeullahphotography.com/weddings and even when I entered garbage into the .htaccess file, nothing happened and makes me suspect the .htaccess file is being ignored.
Specific pointers about what I'm doing wrong will be greatly appreciated.
More posts by @Hamm4606531
1 Comments
Sorted by latest first Latest Oldest Best
I don't know why your htaccess isn't being honored. But my best guess is your host has disallowed htaccess overrides. You should contact them to find out.
As for the htaccess code, try this:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?janeullah.com$ [NC]
RewriteRule ^(.*)$ janeullahphotography.com/ [R=301,L]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.