404 Redirect??

loclhero

Supreme Member
Joined
Jun 11, 2007
Messages
1,284
Reaction score
2,444
I know how to make a 404 page but isn't there a way in cpanel I can simply redirect any 404 to an aff offer?
 
I would like to know how to do this also. It makes it much easier and quicker instead of making 404 redirect pages.
 
In your CPanel click on Error Pages, then click on 404 and add your HTML to redirect people.
 
thanks for the help vze
rep given but when i tried this before it didn't work. All i get is my page with Page not found error 404
??

i've got tags to chose from that i'm not understanding. visitors ip address, referring url etc.
if i just put the aff code in the box nothing's happenin
 
Just add this into the box:

Code:
<meta HTTP-EQUIV="REFRESH" content="0; url=http://affiliatelink.com">

Don't worry about the tags. They are meant as shortcuts. Where I put affiliatelink just add whatever you want.
 
I have several sites that are totally ran from a custom 404 page. The sites have no physical pages or directories. The 404 page parses out the url request and queries the database for that pages content to display. If someone types in a page url that isn't in the database they are shown the index page of the virtual directory they have requested. If the virtual directory isn't in the database they are taken to the site's virtual home page.

Tom
 
Just add this into the box:

Code:
<meta HTTP-EQUIV="REFRESH" content="0; url=http://affiliatelink.com">

Don't worry about the tags. They are meant as shortcuts. Where I put affiliatelink just add whatever you want.


OH, okay. So really it's a meta refresh tag more than an actual redirect like a 301.
Thanks again.
 
You can also use the following in an .htaccess file to redirect instead of giving a 404.

Code:
# 404 Redirects
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?(.*)$ /index.php?url=$1 [L]

Replace /index.php?url=$1 with whatever URL you want to redirect it to.

Hope this helps.
 
Back
Top