What am I doing wrong in this subdomain redirect?
What I need is as follows: People visiting 201101.donateaday.net should be sent to http://donateaday.net/2011/01/bla-kors-norge/
I tried:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^201101.donateaday.net/
RewriteRule ^(.*)$ http://donateaday.net/2011/01/bla-kors-norge/ [r=301,l]
However, this does not seem to work. What am I doing wrong?
Evert
It seems your RewriteCond has some characters too many. Try this instead:
RewriteCond %{HTTP_HOST} 201101\.donateaday\.net
The dots are escaped so that they match literal dots, instead of any character.
精彩评论