Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trying to capture file that causes 404 error, or other solution...

Status
Not open for further replies.

spewn

Programmer
May 7, 2001
1,034
i'm trying to figure out how to grab wrong page or file name on 404 redirect in .htaccess...

i currently have the 404 redirect to a .cgi file, which works fine, but i need to know which file got them there.

i tried a http_referrer environment variable in my cgi file, but no go.

any ideas?

thanks!

- g



 
sorry. i posted this a little clearer in apache group.

thanks!

- g
 
Code:
ErrorDocument 404 /404.cgi

Code:
#!/usr/bin/perl -w

print "Content-Type: text/html\n\n";
print "The file, <b>$ENV{REQUEST_URI}</b>, doesn't exist.\n";

-------------
Cuvou.com | My personal homepage
Code:
perl -e '$|=$i=1;print" oo\n<|>\n_|_";x:sleep$|;print"\b",$i++%2?"/":"_";goto x;'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top