LINK from any STRING of text. Does anyone know how?

Discussion in 'Programming' started by Siek, Sep 21, 2008.

  1. #1
    Basically what im trying to do is have any string of text such as

    hxxp://www.WEBSITE.com/id=4907190
    hxxp://www.WEBSITE.com/id=8941891

    The extra string of text added to the website would direct to the same link.. Basically i want to have random numbers from any string of numbers link to the same site. This adds uniqueness - which helps with conversions.

    Any help would be appreciated.
     
    Siek, Sep 21, 2008 IP
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    use mod_rewrite?

    have _http://website.com/id-1232132/ redirected like so in .htaccess:

    RewriteEngine On
    RewriteRule ^id-([0-9]+)/$ /redirect_target.php?id=$1 [L]

    the $1 will pass on the random number as $_GET['id'] but if you don't really care as it's all random, you can just ignore that.

    personally, i'd do something more meaningful like /some_keyword_213213.html - at least it will help with your seo.
     
    dimitar christoff, Sep 23, 2008 IP
  3. agentsmith77

    agentsmith77 Active Member

    Messages:
    176
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    66
    #3
    honestly I'm not sure what you are trying to do... so the random string is the numbers? "id=4907190" ??

    A simple way to do this if you just need a different URL is... adding a ?

    hxxp://www.WEBSITE.com/?id=4907190
    hxxp://www.WEBSITE.com/?id=8941891
    hxxp://www.WEBSITE.com/?id=5907190
    hxxp://www.WEBSITE.com/?id=9941891

    these should all go to the same page but different link...
     
    agentsmith77, Sep 24, 2008 IP