Buy Anything On eBay - Life Insurance - Ringtones - Montana Music - Loan Secured

PDA

View Full Version : Tricky mod_rewrite


jontelofot
Aug 27th 2004, 4:16 am
I currently have the following rule:
RewriteRule ^Dir/(.*)$ index.php?cat=$1

This rule changes for example:
/index.php?cat=SEO
to:
/Dir/SEO/

However, I want it as just:

/SEO/

Removing the 'Dir' part in the rule generates an error, and I can't seem to find an example anywhere. I'm sure it's pretty easy, but I just can't figure out the syntax...

Help! :)

/Jon

jontelofot
Aug 27th 2004, 4:27 am
Nevermind. A trailing slash after the wildcard was all it needed! :)

RewriteRule ^(.*)/$ ?cat=$1