This problem is driving me completely insane. I'm trying to use mod_rewrite rules to make better URLs. I used one of those generators to make my rules for me, and one of them works perfectly, the other won't work no matter what I try. Here's the text in my .htaccess:
Options +FollowSymLinks
RewriteEngine on
RewriteRule p/(.)/(.)/$ /p.php?$1=$2
RewriteRule users/(.*).htm$ /profile.php?user=$1
So the first rule works perfectly... it redirects this:
/p.php?file=file
to:
/p/file/file/
The second is what I'm having an issue with. It should take this:
/profile.php?user=tim
and redirect to... well, anything really. In the above example, in theory, it should go to /users/tim.htm. Ideally, I'd like it to redirect to:
/user/tim/
But I would take anything at this point. I'm trying to get a solid hold on rewrite rules, since I think I'm going to use them a lot in a new project, but this is just really frustrating me. Especially since all I get is a 404 error when I get something wrong rather than a helpful error message.
Anyway, any advice out there?