What is wrong with this apache url htaccess rewrite rule?
I've got this:
RewriteEngine On
RewriteRule ^/redir?url=(.*)$ http://blah.$1
开发者_JAVA技巧When I use this and go to the url that looks like:
http://www.mydomain.com/redir?url=www.otherdomain.com
It says the file isn't found on my server. I.E. no redirect.
What I want it to do in the above example would be to redirect to:
http://blah.www.otherdomain.com
Rewriterules don't work on querystrings, RewriteCond's do:
RewriteCond %{QUERY_STRING} url=([^&]+)(&|$)
RewriteRule ^/?redir$ http://blah.%1
精彩评论