W
Will
interesting situation:
OS: Windows
Server: Apache 1.3.29
Modified ErrorDocument 404 to point to a redirect.pl script in cgi-bin
http.conf
ErrorDocument 404 /cgi-bin/redirect.pl
redirect.pl
sub DO_REDIRECT {
...
print "Location: /index.html \n\n";
...
}
this works when I access the script directly by its url.
but when its forwarded to by the 404 error it does not work.
Any one has any idea how to make it work, please reply.
Additional Info ... :
I tried printing out the headers manually but it does not work.
lets say: http://yourdomain.com/some_nonsensical_stuff_here
Here are some headers from the 404 redirect:
GET /some_nonsensical_stuff_here HTTP/1.1
-server headers-
HTTP/1.z 404 Not Found
Server: Apache/1.3.29 (Win32)
Location: http://yourdomain.com/index.html
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain
The header from accessing the url directly are a bit different:
GET /index.html HTTP/1.1
-server headers-
HTTP/1.z 200 OK
Server: Apache/1.3.29 (Win32)
Etag: "0-5d6-3af1f126"
Accept-Ranges: bytes
Content-Length: 1494
Content-Type: text/html
OS: Windows
Server: Apache 1.3.29
Modified ErrorDocument 404 to point to a redirect.pl script in cgi-bin
http.conf
ErrorDocument 404 /cgi-bin/redirect.pl
redirect.pl
sub DO_REDIRECT {
...
print "Location: /index.html \n\n";
...
}
this works when I access the script directly by its url.
but when its forwarded to by the 404 error it does not work.
Any one has any idea how to make it work, please reply.
Additional Info ... :
I tried printing out the headers manually but it does not work.
lets say: http://yourdomain.com/some_nonsensical_stuff_here
Here are some headers from the 404 redirect:
GET /some_nonsensical_stuff_here HTTP/1.1
-server headers-
HTTP/1.z 404 Not Found
Server: Apache/1.3.29 (Win32)
Location: http://yourdomain.com/index.html
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/plain
The header from accessing the url directly are a bit different:
GET /index.html HTTP/1.1
-server headers-
HTTP/1.z 200 OK
Server: Apache/1.3.29 (Win32)
Etag: "0-5d6-3af1f126"
Accept-Ranges: bytes
Content-Length: 1494
Content-Type: text/html