Results 1 to 3 of 3
Thread: 404 pages - redirect?
-
11-24-2006, 04:23 AM #1Junior Guru Wannabe
- Join Date
- Jun 2006
- Posts
- 69
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?
-
11-24-2006, 05:43 PM #2Newbie
- Join Date
- Jan 2002
- Location
- Poland
- Posts
- 5
You can add this to your .htaccess file:
Code:ErrorDocument 404 http://www.yourdomain.com
-
11-25-2006, 07:44 PM #3Web Hosting Master
- 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
PHP Code:<?php header("Location: http://www.yoursite.com/"); ?>