1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Tricky mod_rewrite

Discussion in 'Apache' started by jontelofot, Aug 27, 2004.

  1. #1
    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:
    SEMrush
    /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 27, 2004 IP
    SEMrush
  2. jontelofot

    jontelofot Peon

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Nevermind. A trailing slash after the wildcard was all it needed! :)

    RewriteRule ^(.*)/$ ?cat=$1
     
    jontelofot, Aug 27, 2004 IP