Welcome Guest, Not a member yet? Register   Sign In
Mod_Rewrite Voodoo Problem - not just your average magic... [solved - but interesting!]
#2

[eluser]mddd[/eluser]
I think you could just check in routine #2 if the requested uriis not already /site/...
That way, the loop is broken. If someone goes to bar.foo.com, the redirection goes to /site/bar and at that time it will no longer match the condition so it will not redirect again.

Code:
RewriteCond %{HTTP_HOST} !^(www\.foo.*)$ [NC]                    
RewriteCond %{REQUEST_URI} !^site/ [NC]
RewriteCond %{HTTP_HOST} ^([a-z\-\_]*)\.foo\.([a-z\.]{2,5})$ [NC]
RewriteRule ^(.*)$ index.php/site/%1


Messages In This Thread
Mod_Rewrite Voodoo Problem - not just your average magic... [solved - but interesting!] - by El Forum - 04-13-2010, 07:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB