Link forwarding

Discussion in 'Link Development' started by AHA7, Jan 8, 2007.

  1. #1
    Hello,

    I want to use a custom short URL to point to another long URL and I thought that the best way to do this is to create a new page with a 'nice' URL that redirests to the long URL.
    For example, I want to use mysite.com/niceURL, and then create an index.html or index.php file which contains a redirect code that redirects to the long URL and place the file in the directory "niceURL" so that when someone visits mysite.com/niceURL it automatically redirects to the long URL.

    My question is: Which is better/faster to use; An HTML redirect code in an index.html file or a PHP redirect code in an index.php file?
    And also can you provide me with the HTML or PHP code that can be used to redirect the page another URL?

    Thanks in advance!
     
    AHA7, Jan 8, 2007 IP
  2. vnviews

    vnviews Peon

    Messages:
    746
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can use mode re-write of Apache to change the your urls to SEO friendly urls. It's better to use redirect.
    Anyway, I don't think this is right forum for your question.
     
    vnviews, Jan 8, 2007 IP
  3. AHA7

    AHA7 Peon

    Messages:
    445
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I don't have control over the server (If I didn't get you wrong!)
    I want to know if it's better to use HTML or PHP redirect script.
     
    AHA7, Jan 8, 2007 IP
  4. kajakske

    kajakske Well-Known Member

    Messages:
    139
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    165
    #4
    You don't need control over the server, you can easily achieve this with a .htaccess file ...
     
    kajakske, Jan 8, 2007 IP
  5. Richie_Ni

    Richie_Ni Illustrious Member

    Messages:
    10,721
    Likes Received:
    1,175
    Best Answers:
    0
    Trophy Points:
    410
    #5
    Yes,.htaccess is the best!
     
    Richie_Ni, Jan 8, 2007 IP
  6. AHA7

    AHA7 Peon

    Messages:
    445
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    How can I do that?
    Can I get a more detailed answer please?
     
    AHA7, Jan 8, 2007 IP
  7. Richie_Ni

    Richie_Ni Illustrious Member

    Messages:
    10,721
    Likes Received:
    1,175
    Best Answers:
    0
    Trophy Points:
    410
    #7
    Richie_Ni, Jan 8, 2007 IP
    AHA7 likes this.
  8. vnviews

    vnviews Peon

    Messages:
    746
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #8
    vnviews, Jan 8, 2007 IP
    AHA7 likes this.