1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mod_Rewrite Need A LiL Help

Discussion in 'White Hat SEO' started by advancedfuture, Jan 2, 2009.

  1. advancedfuture

    advancedfuture Junior Member

    Joined:
    Oct 18, 2008
    Messages:
    131
    Likes Received:
    78
    I am trying to rewrite

    Code:
    www.mydomain.com/services.php?st=California&city=Agoura%20Hills&services=Car%20Wash
    
    so it shows up clean like maybe

    Code:
    www.mydomain.com/california/agoura-hills/car-wash
    
    I'm so stuck, nothing i'm doing is working. Any help with mod-rewrite to get it to use clean URLs would be a HUGE help! And a HUGE thanks!
     
  2. advancedfuture

    advancedfuture Junior Member

    Joined:
    Oct 18, 2008
    Messages:
    131
    Likes Received:
    78
    Ive tried

    ^(.*)/(.*)/(.*) services.php?st=$1&city=$2&services=$3

    but I just keep getting a Error 400 error
    blehhhh
     
  3. cooooookies

    cooooookies Senior Member

    Joined:
    Oct 6, 2008
    Messages:
    1,008
    Likes Received:
    216
    .* matches all, including / (and the rest)

    if ^(.*)/(.*)/(.*) services.php?st=$1&city=$2&services=$3 is your rewriting rule, then it is however wrong, should be something like
    rewriterule REGEX_OLD NEW