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.

htaccess rule to allow spaces in the url...

Discussion in 'Apache' started by mrconstantine, Jul 5, 2006.

  1. #1
    Hi,

    I've been trying for hours to get this to work, its simple.. All i want to do is have a rewrite rule that allows http://www.domain.com/make/Aston Martin and passes the make to http://www.domain.com/viewmake?make=Aston Martin

    Right now if I go to www.domain.com/make/Aston%Martin, and try to echo the make, all it will echo is 'Aston', it loses everything after the space...

    Heres the rule that works fine for makes with no spaces in them...

    RewriteRule make/([-a-zA-Z0-9]+) viewmake.php?make=$1 [L]

    Simply, how do I allow spaces in the rule? (%20)
    SEMrush
    Cheers
    Mrconstantine
     
    mrconstantine, Jul 5, 2006 IP
    SEMrush
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    RewriteRule ^make/([^.]+)$ viewmake?make=$1 [L]
     
    Nintendo, Jul 5, 2006 IP