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.
  2. Better Analytics for WordPress Get It Free

Stupid simple Mod_rewrite problem tripining me up - Second set of eyes please.

Discussion in 'Apache' started by RoscoeT, Apr 11, 2012.

  1. #1
    Hey all,

    I'm not sure what I am doing wrong here. A second set of eyes would not hurt.
    I want to redirect all traffic for
    website.com/search.php?more=keyphrase
    to
    website.com/?s=keyphrase

    No matter what I try I keep getting sent to
    website.com/?s=search.php?more=keyphrase
    which of course does not work...

    Here is what I have so far. I just don't see the error.

    RewriteRule ^search.php\?more\=(.*)$ /?s=$1 [R,L]
     
    RoscoeT, Apr 11, 2012 IP
  2. RoscoeT

    RoscoeT Peon

    Messages:
    78
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteCond %{QUERY_STRING} more=(.*)
    RewriteRule ^search.php$ /?s=%1 [R=301,L,QSA]

    This seems to work better but still gets me to
    website.com/s?=keyphrase&more=keyphrase
     
    RoscoeT, Apr 11, 2012 IP