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.

Buying $5.00 to help with this mod_rewrite

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

  1. #1
    Hello,

    I will pay $5.00 to whoever can get this to work for me (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
     
    Last edited by a moderator: Nov 4, 2009
    jpinheiro, Nov 4, 2009 IP
  2. Sky AK47

    Sky AK47 Member

    Messages:
    298
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    45
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule search/(.*)/$ /search/search.php?cx=008406457722762222407%3Azeakjf5um_o&cof=FORID%3A9&ie=UTF-8&q=$1&sa=Search
    Code (markup):
    How about that?
     
    Sky AK47, Nov 4, 2009 IP
  3. jpinheiro

    jpinheiro Peon

    Messages:
    1,211
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    if that works I will pay you $5.00 do I put that code into .htaccess file?
     
    jpinheiro, Nov 4, 2009 IP
  4. Sky AK47

    Sky AK47 Member

    Messages:
    298
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    45
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Yes, but I think you'll need to remove some fields from the form first.
     
    Sky AK47, Nov 4, 2009 IP
  5. walviax

    walviax Member

    Messages:
    246
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    As Seller:
    100% - 0
    As Buyer:
    100% - 1
    #5
    Is it solved?

    If it's not solved yet, try my code:

       Options +FollowSymlinks
       RewriteEngine On
       
       RewriteBase /
    
       RewriteRule ^search/yahoo search/search.php?cx=008406457722762222407%3Azeakjf5um_o&cof=FORID%3A9&ie=UTF-8&q=yahoo&sa=Search
    Code (markup):
     
    walviax, Nov 4, 2009 IP