Redirecting incorrect URL requests

Discussion in 'HTML & Website Design' started by johneva, Nov 29, 2007.

  1. #1
    Hi guy

    Could someone tell me how to make it so any incorrect URL requests are redirected to the index page of a site?

    I assume it is only a small bit of code in a HTaccess file but just not sure what it is I need to do.

    Cheers in advance for any help
     
    johneva, Nov 29, 2007 IP
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need to redirect the 404 error to another page - wouldnt recommend that it goes to the index page as it will confuse people who were looking for something else. If you have an Apache web server then htaccess is the way to do it and can be found http://baremetal.com/gadgets/htaccess/ where as you need to use other methods if you have an IIS web server
     
    AstarothSolutions, Nov 29, 2007 IP
  3. TomBrownsword

    TomBrownsword Peon

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    A 301 redirect in your .htaccess file would probably work the best, in my opinion.

    A great article on how to do 301 redirects can be found at (no affiliation):


    http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

    HTH,
    Tom
     
    TomBrownsword, Nov 29, 2007 IP