Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I recently switched sites from (which had an A dns entry pointing to to I'm on Dreamhost, currently have A record on going to and using Google Apps for Email.

I'm trying to set up a rewrite rule which (for now) redirects anyone who clicks on or to: or

These are the .htaccess contents I've tried that didn't redirect

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)$1 [R=301,L] 


RewriteEngine on
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

Typing in doesn't redirect to 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.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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 ^(.*)$$1 [R=301,L]
share|improve this answer
Thanks for your answer, John. I've contacted Dreamhost and will wait on their response. I noticed an error in my original question. I meant: "I'm trying to set up a rewrite rule which (for now) redirects anyone who clicks on or to: or" – janoulle May 20 '11 at 15:57
Your rule worked!! :D Thanks a bajillion times, John! :D I don't know if Dreamhost did anything on their end but the tech also noted that this line in my rules: "!^$ [NC]" was saying "NOT" – janoulle May 20 '11 at 16:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.