开发者

What am I doing wrong in this subdomain redirect?

开发者 https://www.devze.com 2023-02-12 12:33 出处:网络
开发者_Go百科What I need is as follows: People visiting 201101.donateaday.net should be sent tohttp://donateaday.net/2011/01/bla-kors-norge/
开发者_Go百科

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消