need help with mod rewrite (willing to pay for assistance)

Discussion in 'Apache' started by jpinheiro, Nov 4, 2009.

  1. #1
    Hello,

    I am willing to pay $5.00 if necessary (paypal)

    I have links like this on my site:

    its a search so where it says &q=yahoo thats cuz i searched yahoo so that would change depending on what was searched

    http://joeyelectric.com/search/sear...f5um_o&cof=FORID:9&ie=UTF-8&q=yahoo&sa=Search

    I want them to look like this:

    I want to make the the url just show the query that was searched but still access the url above ... is this possible?

    http://joeyelectric.com/search/yahoo


    this is the closest
    i could get:

    
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule search/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/$ /search/search.php?$1=$2&$3=$4&$5=$6&$7=$8&$9=$10
    
    Code (markup):
    which makes a url like this:

    
    http://joeyelectric.com/search/cx/008406457722762222407:zeakjf5um_o/cof/FORID:9/ie/UTF-8/q/yahoo/sa/Search/
    
    Code (markup):
    What i had searched was "yahoo" <- which is $8

    I want the url to just have $8

    -John
     
    jpinheiro, Nov 4, 2009 IP
  2. chadsmith

    chadsmith Peon

    Messages:
    82
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You should be able to use something like:

    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^search/(.+)$ /search/search.php?cx=008406457722762222407:zeakjf5um_o&cof=FORID:9&q=$1 [L]
    Code (markup):
     
    chadsmith, Nov 4, 2009 IP
  3. jpinheiro

    jpinheiro Peon

    Messages:
    1,211
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    0
    #3
    thanks but someone already sent me the code

    -John
     
    jpinheiro, Nov 4, 2009 IP
  4. jpinheiro

    jpinheiro Peon

    Messages:
    1,211
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    0
    #4
    -edit posted in wrong place
     
    jpinheiro, Nov 4, 2009 IP