几个小时以来,我一直试图解决与./ mo改有关的问题,但我确实能够说明问题是什么。
# Rule 1
RewriteCond %{HTTP_HOST} ^www.domain.nl.*$
RewriteRule (.*) http://domain.nl/$1
# Rule 2
RewriteCond %{HTTP_HOST} ^www.([a-z0-9]*?).domain.nl.*$
RewriteRule (.*) http://%1.domain.nl/$1
# Rule 3
RewriteCond %{HTTP_HOST} ^([a-z0-9]+?).domain.nl(.*)$
RewriteRule (.*) http://domain.nl/%1/$1
http://www.static.domain.nl
But the result for this one to me seems completely random: http://www.domain.nl/static/style/file.css becomes http://domain.nl/www/http://domain.nl/static/style/file.css .
I think this url should be matched by rule #1 which should cause a redirect (and as such skip rule #2 and #3). However it seems rule #3 is somehow matching this url and causing a very peculiar rewrite.
Very striking observarion: if rule #3 is removed with only #1 and #2 remaining, it works as it should ( www is removed, rest remains intact).
I have no idea at all what s happening, any clues?
Thanks a lot!