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.

Mod_Rewrite help (IDs into names)

Discussion in 'Apache' started by Randall Flagg, May 8, 2009.

  1. #1
    Hi,

    I have a problem with the mod_rewrite. I'm running a holiday rentals website, I need to fix my unfriendly SEO links before I officially launch the site.

    In the SEARCH RESULTS, right now for any particular DESTINATION it is like:

    http://domain.com/index.php?obj=search&ns=1&regional_ext1_id=1023

    where id=XYZ is the id for the DESTINATION.

    now I would like that to display something like:

    http://domain.com/destination

    (for example domain.com/germany)


    The same thing (similar) would be required for COUNTRIES and REGIONS.

    I'd really appreciate if someone would help me with this....thanks! :)
     
    Randall Flagg, May 8, 2009 IP
  2. aGor

    aGor Member

    Messages:
    80
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.*)$ index.php?id=$1
     
    aGor, May 9, 2009 IP
  3. Randall Flagg

    Randall Flagg Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Please explain a bit. I'm not so sure that would work....
     
    Randall Flagg, May 9, 2009 IP
  4. aGor

    aGor Member

    Messages:
    80
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #4
    it puts everything behind domain.com/ and puts it in ?id

    Havent tested the code though, so dont know for sure if it works, but it should i think
     
    aGor, May 9, 2009 IP