Reputation: 7490
I just recently ported over my source code to Ubuntu Server from Windows and I've been having a few .htaccess mod_rewrite problems. I have mod_rewrite enabled for Apache. Here is my current .htaccess
RewriteEngine On
RewriteRule ^css/default/?$ css/default.css
RewriteRule ^user/?$ user.php
RewriteRule ^user/([A-Za-z0-9_]+)/?$ user.php?username=$1
Here are some examples of the problems that I'm having. For some reason, I can access
http://localhost/css/default
with no problem, but when I do
http://localhost/css/default/
it cannot find it. Also, accessing
http://localhost/user/hunter101/
doesn't seem to register hunter101 as a GET anymore... any suggestions? Thanks
Upvotes: 0
Views: 264
Reputation: 186722
Shouldn't you escape the forward slash?
RewriteRule ^user\/([A-Za-z0-9_]+)\/?$ user.php?username=$1
I could be wrong.
Upvotes: 0
Reputation: 655677
There might be some conflicts with MultiViews as your URL and files have a very similar name. Try to disable it:
Options -MultiViews
Upvotes: 2