GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How can you redirect ALL 404 pages on a server to a single php file? (https://gfy.com/showthread.php?t=739576)

Myst 06-04-2007 11:00 PM

How can you redirect ALL 404 pages on a server to a single php file?
 
That means on all domains and all subdomains?

Everything redirected to a single php script..

WiredGuy 06-04-2007 11:03 PM

Can't apache pickup all 404 error codes and forward it to your php script page?
WG

k0nr4d 06-04-2007 11:04 PM

httpd.conf

Myst 06-04-2007 11:08 PM

Quote:

Originally Posted by k0nr4d (Post 12545985)
httpd.conf

ooh how?

Myst 06-04-2007 11:13 PM

also.. can you pass the requested URL to the php script?

ffmihai 06-05-2007 01:36 AM

you add the htaccess file in the vhosts directory

BucksMania 06-05-2007 02:06 AM

add this to a .htacess file and place it as high as possible in the dir structure

ErrorDocument 404 http://domain.com/yourscript.php

grumpy 06-05-2007 03:13 AM

Quote:

Originally Posted by BucksMania (Post 12546564)
add this to a .htacess file and place it as high as possible in the dir structure

ErrorDocument 404 http://domain.com/yourscript.php

setting the script like that will loose the referal url, instead do it like thise

ErrorDocument 404 /yourscript.php


and put the script in the main dir

bigalownz 06-05-2007 03:30 AM

or try


RedirectMatch 301 (.*)\.shtml$ http://domain.com/404.php
RedirectMatch 301 (.*)\.html$ http://domain.com/404.php
RedirectMatch 301 (.*)\.htm$ http://domain.com/404.php
RedirectMatch 301 (.*)\.php$ http://domain.com/404.php

Well Dunn 06-05-2007 03:33 AM

pretty sure you can just edit it in cpanel or httaccess

ssp 06-05-2007 04:04 AM

Man such alot of clueless people in this thread..

Broda 06-05-2007 06:42 AM

Quote:

Originally Posted by ssp (Post 12546914)
Man such alot of clueless people in this thread..

agreed! :disgust


All times are GMT -7. The time now is 07:13 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123