DeathRay2K Posted March 29, 2009 Share Posted March 29, 2009 So basically, I want to do this:redirect example.com/one to example.com/index.php?one=oneAndredirect example.com/one/two to example.com/index.php?one=one&two=twoI've got the first case working, but not the second one, instead I always get a 404 error.Thanks for any help Link to comment Share on other sites More sharing options...
jlhaslip Posted March 29, 2009 Share Posted March 29, 2009 What code can you show us that works and doesn't work? Link to comment Share on other sites More sharing options...
DeathRay2K Posted March 29, 2009 Author Share Posted March 29, 2009 Well, right now as it's in development it's not as general as I want it to be for the second case, so the pertinent stuff looks like this: RewriteRule ^users/([^.]+)/$ index.php?one=users&two=$1 [NC,L]RewriteRule ^([^.]+)/$ index.php?one=$1 [NC,L] Honestly it's been too long since I last worked with the rewrite engine to even know if that's supposed to do what I think it is. :)Edit: I got it fixed, it turned out to be precisely because I wasn't doing it in a generic way, but I changed it to RewriteRule ^([^/]+)/([^.]+)/$ index.php?one=$1&two=$2 [NC,L]RewriteRule ^([^.]+)/$ index.php?one=$1 [NC,L] And it's all good. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.