这个Apache网址htaccess重写规则有什么问题?

问题描述:

我有这样的:这个Apache网址htaccess重写规则有什么问题?

RewriteEngine On 
RewriteRule ^/redir?url=(.*)$ http://blah.$1 

当我使用这一点,去那个样子的网址:

http://www.mydomain.com/redir?url=www.otherdomain.com 

它说该文件是不是我的服务器上找到。 I.E.没有重定向。

我希望它在上面的例子做的是重定向到什么:

http://blah.www.otherdomain.com 

的RewriteRules不要在查询字符串工作,的RewriteCond的DO:

RewriteCond %{QUERY_STRING} url=([^&]+)(&|$) 
RewriteRule ^/?redir$ http://blah.%1