Forum Moderators: phranque

Message Too Old, No Replies

htaccess 400 Error Problem

         

leon131

11:20 pm on Jun 30, 2008 (gmt 0)

10+ Year Member



I am using the following htaccess script on a folder called /test/

RewriteEngine On

RewriteCond %{REQUEST_URI} !.php
RewriteCond %{REQUEST_URI} !.htm
RewriteCond %{REQUEST_URI} !.gif
RewriteCond %{REQUEST_URI} !.jpg
RewriteCond %{REQUEST_URI} !.pdf
RewriteCond %{REQUEST_URI} !.cgi
RewriteCond %{REQUEST_URI} !.css

RewriteRule ^(.*) index.php?r=$1

I want any request inside the test folder to be redirected to the index page and this works, except in one case.

If I go to [mysite.com...] it works.
But if I go tp [mysite.com...] I get a 400 Error and I have no idea why.

Does anybody know how to fix this?

Thanks

eelixduppy

8:05 pm on Jul 1, 2008 (gmt 0)



Welcome to WebmasterWorld! :)

Try the following rule:


RewriteRule ^(.*)$ /index.php?r=$1