Results 1 to 3 of 3
  1. #1

    404 pages - redirect?

    I took over a friend's ringtone website that was going nowhere, wiped everything and just created a general forum.
    The result is now that there are thousands of pages and their URLs that previously contained the ringtones and stuff that were indexed by Google. Around 13000.
    These pages no longer exist. How can I create a redirect for all those pages to the index page of the forum?

  2. #2
    You can add this to your .htaccess file:
    Code:
    ErrorDocument 404 http://www.yourdomain.com

  3. #3
    Join Date
    Jun 2006
    Posts
    1,767
    Use the above if you want to show the homepage AS the 404 page. Eg user goes to yoursite.com/dsgasgfsdhfdgdfh.php they would see the home page at that address.

    If you would like the user, upon going to the invalid URL, to be taken back to the home page at the real home page's URL then add this to .htaccess:
    Code:
    ErrorDocument 404 http://www.yoursite.com/404.php
    Then create the php file at that address and put this in it:
    PHP Code:
    <?php header("Location: http://www.yoursite.com/"); ?>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •