Shorten URL

Discussion in 'Apache' started by USPB, Jan 9, 2008.

  1. #1
    USPB, Jan 9, 2008 IP
  2. kennick

    kennick Peon

    Messages:
    334
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Could you not get your domain, create 5000 folders e.g yourdomain/public_htm/5478/ and so on.

    Then create a simple index.html file for each with a simple redirect code such as:

    Place the following HTML redirect code between the <HEAD> and </HEAD> tags of your HTML code.
    <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">

    The above HTML redirect code will redirect your visitors to another web page instantly. The content="0; may be changed to the number of seconds you want the browser to wait before redirecting.
     
    kennick, Jan 9, 2008 IP
  3. Markas

    Markas Well-Known Member

    Messages:
    710
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    128
    #3
    Markas, Jan 9, 2008 IP
  4. hostingcoupon

    hostingcoupon Peon

    Messages:
    447
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hostingcoupon, Jan 10, 2008 IP
  5. abdussamad

    abdussamad Active Member

    Messages:
    543
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #5
    this is very easy to do. What you need is to use a url shortening script. Just search for some free ones and use those. A few that I found:

    http://www.hido.net/projects/phurl/
     
    abdussamad, Jan 10, 2008 IP
  6. USPB

    USPB Peon

    Messages:
    887
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thanks for the URL
     
    USPB, Jan 10, 2008 IP
  7. biohammer

    biohammer Peon

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    cool thanks
     
    biohammer, Jan 10, 2008 IP
  8. jmf000

    jmf000 Peon

    Messages:
    46
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    No need to call a programmer
    In .htaccess
    
    RewriteEngine On
    RewriteRule ^/([0-9]+)/$ http://example.com/index.php?action=referralcode=$1
    
    Code (markup):
    All hits to www.domain.com/34525/ ---> http://example.com/index.php?action=referralcode=3425
     
    jmf000, Jan 11, 2008 IP
  9. PowerExtreme

    PowerExtreme Banned

    Messages:
    2,118
    Likes Received:
    75
    Best Answers:
    0
    Trophy Points:
    0
    #9
    PowerExtreme, Jan 11, 2008 IP
  10. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I'm not sure I understand the problem here. jmf000's suggestion will work perfectly with what I understand the problem to be so I must have understood the problem wrong.

    Unless you're referring to the fact that jmf000 forgot to put [R] after the rewrite rule to make it a redirect.
     
    Ladadadada, Jan 13, 2008 IP