.htaccess 400 error

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
cabofixe
Forum Newbie
Posts: 1
Joined: Thu Feb 26, 2009 10:49 am

.htaccess 400 error

Post by cabofixe »

Hey all,

I'm not sure if this is the right category for this but htaccess files use regex so I thought about doing it here. I'm making a CMS where every file goes through my template code.

My .htaccess file looks like this:

Options +FollowSymlinks
RewriteEngine on
RewriteRule . control.php [L]

It works well for almost everything you can try it at: http://lawfirmsites.com/clondon/ or http://lawfirmsites.com/clondon/index or http://lawfirmsites.com/clondon/test

It all works perfectly except for one url: http://lawfirmsites.com/clondon (Note the lack of a trailing slash). It gives me a 400 Bad Request error. Anybody know how I can correct this? Thanks in advance!
NOmeR1
Forum Newbie
Posts: 8
Joined: Sat Feb 14, 2009 8:32 am

Re: .htaccess 400 error

Post by NOmeR1 »

It must work perfectly in any case. But I think you should try to remove "[L]" :

Code: Select all

Options +FollowSymlinks
RewriteEngine on
RewriteRule . control.php
Sometimes it breaks working
Post Reply