Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Forums
Blogs
Articles
Groups
Galleries
Member List
Calendar
Home
Forum
Simply Business
Fucking Around & Business Discussion
How can you redirect ALL 404 pages on a server to a single php file?
How can you redirect ALL 404 pages on a server to a single php file?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Myst
Confirmed User
Join Date:
Feb 2004
Posts:
4708
Share
Post
#1
How can you redirect ALL 404 pages on a server to a single php file?
06-04-2007, 10:00 PM
That means on all domains and all subdomains?
Everything redirected to a single php script..
ICQ: 298-523-037
WiredGuy
Pounding Googlebot
Join Date:
Aug 2002
Posts:
34515
Share
Post
#2
06-04-2007, 10:03 PM
Can't apache pickup all 404 error codes and forward it to your php script page?
WG
I play with Google.
Comment
Post
Cancel
k0nr4d
Confirmed User
Join Date:
Aug 2006
Posts:
9231
Share
Post
#3
06-04-2007, 10:04 PM
httpd.conf
Mechanical Bunny Media
Mechbunny Tube Script
|
Mechbunny Webcam Aggregator Script
|
Custom Web Development
Comment
Post
Cancel
Myst
Confirmed User
Join Date:
Feb 2004
Posts:
4708
Share
Post
#4
06-04-2007, 10:08 PM
Originally posted by
k0nr4d
httpd.conf
ooh how?
ICQ: 298-523-037
Comment
Post
Cancel
Myst
Confirmed User
Join Date:
Feb 2004
Posts:
4708
Share
Post
#5
06-04-2007, 10:13 PM
also.. can you pass the requested URL to the php script?
ICQ: 298-523-037
Comment
Post
Cancel
ffmihai
keep walking...
Join Date:
Jun 2002
Posts:
7177
Share
Post
#6
06-05-2007, 12:36 AM
you add the htaccess file in the vhosts directory
Comment
Post
Cancel
BucksMania
Confirmed User
Join Date:
Oct 2005
Posts:
3758
Share
Post
#7
06-05-2007, 01: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
Comment
Post
Cancel
grumpy
Too lazy to set a custom title
Join Date:
Jan 2002
Posts:
9870
Share
Post
#8
06-05-2007, 02:13 AM
Originally posted by
BucksMania
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
Don't let greediness blur your vision
|
You gotta let some shit slide
icq - 441-456-888
Comment
Post
Cancel
bigalownz
Confirmed User
Join Date:
Aug 2005
Posts:
1657
Share
Post
#9
06-05-2007, 02: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
$100 free credit for all hosting needs
Comment
Post
Cancel
Well Dunn
Confirmed User
Join Date:
Sep 2005
Posts:
1026
Share
Post
#10
06-05-2007, 02:33 AM
pretty sure you can just edit it in cpanel or httaccess
ICQ: 471859252
Mailers! ICQ me I want your traffic!!!!
We will pay daily, weekly, monthly, WHATEVER! Just contact me and we will get you paid!
Comment
Post
Cancel
ssp
Confirmed User
Join Date:
Jan 2005
Posts:
7990
Share
Post
#11
06-05-2007, 03:04 AM
Man such alot of clueless people in this thread..
Comment
Post
Cancel
Broda
Confirmed User
Join Date:
Feb 2003
Posts:
1874
Share
Post
#12
06-05-2007, 05:42 AM
Originally posted by
ssp
Man such alot of clueless people in this thread..
agreed!
CheapAssDesigns.com
- when you need quality designs at affordable prices.
icq: 230-729-205
info |at| cheap ass designs dot com
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎
☕
Comment