[英]What is the Apache URL Rewrite rule for my .htaccess file for this IIS rule?
[英]What is wrong with this apache url htaccess rewrite rule?
我有这个:
RewriteEngine On
RewriteRule ^/redir?url=(.*)$ http://blah.$1
当我使用它并转到如下网址时:
http://www.mydomain.com/redir?url=www.otherdomain.com
它说在我的服务器上找不到该文件。 IE浏览器没有重定向。
在上面的示例中,我希望它重定向到:
http://blah.www.otherdomain.com
Rewriterules不适用于查询字符串,RewriteCond可以:
RewriteCond %{QUERY_STRING} url=([^&]+)(&|$)
RewriteRule ^/?redir$ http://blah.%1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.