|
| Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more. |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Custom User Title
Join Date: Aug 2006
Location: Michigan
Posts: 1,961
Reputation: 238
|
Bad Link Re-Direct
If somone clicks on a link to my site (say www.mysite.com/oldpage.htm) and the page does not exist, they get a page not found error. How can I change this so they go to the index page?
I converted some html sites to PHP, but the html files are still listed out there in places such as search engines and I don't want to have a bunch of HTML files out there with refreshes to the PHP file. |
|
|
|
|
#2 |
|
on hiatus
Join Date: Mar 2004
Location: Canada
Posts: 5,815
Reputation: 314
|
You can put a meta tag redirect (with several seconds delay to let 'em know that the URL doesn't exist) in the 404 eror page, with the ErorDocument directive in .htaccess.
Example: ErrorDocument 404 /e404.html There are several other methods, as well. |
|
|
|
|
#3 |
|
Join Date: Feb 2002
Location: n/a
Posts: 7,279
Reputation: 202
|
You can use an .htaccess file with this:
RedirectPermanent /page.html http://www.domain.com/page.php RedirectPermanent /folder/page2.html http://www.domain.com/page2.php You would need to have each file listed on a seperate line. |
|
|
|
|
#4 |
|
Custom User Title
Join Date: Aug 2006
Location: Michigan
Posts: 1,961
Reputation: 238
|
The 404 error page is exactly what I was looking for. My last host had a control panel option that set this for me.
Thanks for the help! |
|
|
|
|
#5 | |
|
Join Date: Oct 2003
Location: Boston, MA
Posts: 2,511
Reputation: 135
|
Quote:
OPS>Services>SiteTools>.htaccess>Custom Error Pages |
|
|
|
|
|
#6 |
|
Custom User Title
Join Date: Aug 2006
Location: Michigan
Posts: 1,961
Reputation: 238
|
Yup, that is where I found it!
I was headed in to make the edit and saw it. The other host had one that was similar to your Hotlink option where it was written out in text. I have been on PowWeb for only a few days now and am liking the interface, for the most part. I am putting several domains on my account and have been a little disappointed in the way it is handled, but I can live with it for the difference in cost. |
|
|
![]() |
| Thread Tools | Search this Thread |
|
|