• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Can your Apache Server do this?

Superwormy

Golden Member
OK, the question goes out to ONLY people that have Apache www Server working on a home computer.

I need some help. I just need you to test whether or not a link in the following format works:

http://servernamehere/index.html/folderthatdoesnotexsist/


Notice that the URL is to a page, then with a directory AFTER it. A directory that DOESNT exsist.

If it works on your computer, I would REALLY REALLY appreciate it if you coudl send me the httpd.conf file from your apache installation, so that I can figure out how to get that to work on my home computer.

Thanks!
 
Oh right heh... duh.

Right so ideally, it should ' Look-Back ' down the URL, so it won't find the nonexsistent directory, adn will instead bring you to index.html


So if you DON'T GET A 404 ERROR and you DON'T GET A 500 INTERNAL SERVER ERROR, I woudl appreciate a copy of httpd.conf!

PLEASE HELP!
 
Originally posted by: Nothinman
I can't see it doing that without some special module or scripting (php, perl, etc).

I agree. You could set up an ErrorDocument for 404, but that wouldn't necessarily work (maybe you could point it to '..'?)
 
Interestingly, my Apache does that for PHP files, but not for HTML files. Note that this is vanilla Apache + PHP, I didn't even touch the configuration files. Anyway, setting up an ErrorDocument shouldn't be too difficult, either - just make it analyze $_SERVER['PATHINFO'] and redirect to the first existing document.
 
Originally posted by: Moonbender
Interestingly, my Apache does that for PHP files, but not for HTML files. Note that this is vanilla Apache + PHP, I didn't even touch the configuration files. Anyway, setting up an ErrorDocument shouldn't be too difficult, either - just make it analyze $_SERVER['PATHINFO'] and redirect to the first existing document.

Thats a pretty cool idea... but what path info will it receive if it is your errordocument?
 
I know exactly what you're talking about. There are a couple of lines that do that, I remember seeing it on one of our servers at work. If you still need this tomorrow drop me a PM and I'll try to find it.
 
Originally posted by: CTho9305
Originally posted by: Moonbender
Interestingly, my Apache does that for PHP files, but not for HTML files. Note that this is vanilla Apache + PHP, I didn't even touch the configuration files. Anyway, setting up an ErrorDocument shouldn't be too difficult, either - just make it analyze $_SERVER['PATHINFO'] and redirect to the first existing document.

Thats a pretty cool idea... but what path info will it receive if it is your errordocument?

Good point. I checked that, and it turns out pathinfo doesn't contain any useful information, but instead there are new variables that you can use:
$_SERVER["REDIRECT_ERROR_NOTES"] = File does not exist: l:/htdocs/sadjkga
$_SERVER["REDIRECT_REQUEST_METHOD"] = GET
$_SERVER["REDIRECT_STATUS"] = 404
$_SERVER["REDIRECT_URL"] = /sadjkga

Obviously, $_SERVER["REDIRECT_URL"] would be the one to use.
 
Back
Top