"Policy violation or wrong htaccess!"
I get this error message from my webhost after patched .htaccess.
Actualy, the patch added these lines:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} !^www\.([^.]+)\.([^.]+)$
RewriteCond %{HTTP_HOST} ^([^.]+)\.([^.]+)\.([^.]+)$
RewriteRule ^(.*)$ index.php?q=~%1/$1 [L]Just before
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
I think it is not an issue of my webhost, as subdomain rewriting of i18n module works (anyway, i've turned it off to test subdomain module).
Can anyone help me?
Thanks.
Comments
Comment #1
Luca O commentedI have double-checked: i done all the 7 steps. Anyway, later i will try to reinstall the module, re-configure it and do some other tests.
Comment #2
setvik commentedTo confirm: Your website works fine before patching .htaccess and breaks after patching .htaccess, correct?
Not sure if this will fix it, but I just noticed a bug.
Add the QSA flag to the rewrite rule.
i.e. Change
RewriteRule ^(.*)$ index.php?q=~%1/$1 [L]
to
RewriteRule ^(.*)$ index.php?q=~%1/$1 [L,QSA]
Comment #3
setvik commentedI just released 1.1 with the QSA flag added to the htaccess patch.
Let me know if that fixes it.
If not, would you be able to e-mail your hosting provider
and ask them which part of the htaccess statement is against
their htaccess policy?
Thanks in advance!
Comment #4
Luca O commentedCorrect.
Now almost all work, thanks!
I set an (auto)alias for blog posts and blogs. Blog posts work correctly (http://username.mydomain.tld/2008/06/13/blah-test works!), i got only a little issue: if i set as blog alias something like "[subdomain]/blog" (so http://username.mydomain.tld/blog) it's ok, but if i put only "[subdomain]", http://username.mydomain.tld fall in an endless loop. Is there some solution?
Comment #5
Luca O commentedSolved, was Global Redirect module conflict.
Anyway 1.1 is out and fixed, so issue closed :P
Thanks!
Comment #6
setvik commentedAwesome. Thanks for your help debugging the problem :-)!