![]() |
apache technical question anyone!?
Sorry a bit off topic but im in a pinch to find this.
How do you pass the broken link in a 404 to a script? Here is an example: ErrorDocument 404 404/404.pl?brokenlink=$LinkITried |
Use REQUEST_URI
PHP Code:
|
Quote:
Code:
ErrorDocument 404 /index.php?module=error&code=404I've seen it behave otherwise on other servers though, where the user plainly gets redirected to the 404 page instead. I assume it's some Apache directive for how to show error documents. |
Quote:
|
Quote:
|
Setup a normal 404 page, then request the script in your 404 page with an image tag using the REQUEST_URI
|
Quote:
there isnt just a fucking variable in apache to pass this? Geez why does this have to be so difficult? ;) |
You have to edit your httpd.conf and and uncomment or add the ErrorDocument 404 directive. This can be set global or in your virtual section.
ErrorDocument 404 /404.html works as well as a external redirect with a complete URL. (note that in this example 404.html would have to be present in your document root dir.) There should be some example lines in your httpd.conf If you don't have access to your conf files you can also use .htaccess to forward the404 errors |
Quote:
|
I just realized you're trying to pass a variable to it.
The referer will be picked up by the script automatically. If you're using perl as cgi, look into the CGI.pm docs to see how its passed. If its mod-perl, checkout the Apache::Registry docs I think the refering url is also an @ENV variable. $ENV{'HTTP_REFERER'}; Replace the haha shit up top with a shift+[ |
Quote:
1. Make sure everything is relative. /404/404.pl is a good start. 2. IE will *NOT* show your custom 404 page if your 404 page is less than 10k. You can just fill the damn page with dots. That'll work. |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
I tested this on one of my servers and it works fine. Double check your perl / apache settings. |
| All times are GMT -7. The time now is 02:32 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123