PowWeb Forums - The Perfect Community for the Perfect Host  

Register now to interact with over 11,000 members! Registered users have Posting Privileges, free access to Private Messaging, Email Notifications and more.

Go Back   PowWeb Community Forums > The PowWeb Platform > General Issues / Questions
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Closed Thread
 
Thread Tools Search this Thread
Old 8-9-06, 12:37 PM   #1
entrecon
Custom User Title
 
entrecon's Avatar
 
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.
entrecon is offline  
Old 8-9-06, 03:02 PM   #2
extras
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.
extras is offline  
Old 8-9-06, 03:10 PM   #3
(jj)
 
(jj)'s Avatar
 
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.
__________________
If silence is golden, then I must be worth million$

(jj)
Jack
(jj)'s Playground
(jj) is offline  
Old 8-10-06, 09:53 AM   #4
entrecon
Custom User Title
 
entrecon's Avatar
 
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!
entrecon is offline  
Old 8-10-06, 09:58 AM   #5
joshuamc
 
joshuamc's Avatar
 
Join Date: Oct 2003
Location: Boston, MA
Posts: 2,511
Reputation: 135
Quote:
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!
We also have this in our control panel.

OPS>Services>SiteTools>.htaccess>Custom Error Pages
joshuamc is offline  
Old 8-10-06, 02:36 PM   #6
entrecon
Custom User Title
 
entrecon's Avatar
 
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.
entrecon is offline  
Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 09:13 PM.


Contents ©PowWeb, Inc. ~ vBulletin, Copyright © 2000-2007 Jelsoft Enterprises Limited.