• 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.

Configuring Web Site to not require the trailing "/"

SaturnX

Diamond Member
Hey,

Quick question, my sites uses a Cobalt RAQ3, and I've just install ASP, PHP, and MySQL onto it, but there's one thing that's been kinda bothering me.

If access the site with the following:

http://ip_address/phpBB

It attempts to download a file called phpBB.. which doesn't exists... and phpBB is a directory.

Is there any setting within Apache or otherwise so that if the trailing "/" slash isn't there it will access the directory?

Thanks for any help.

--Mark
 
I've seen a similar problem to yours a lot, and it usualy involves the "ServerName" directive of the given virtual host not being set right. However your problem seems a bit odd/different. Anyway, i'd try checking there first.

bart
 
Hrmm... ok I'll take a look into that.. any ideas / tips / pointers? I have complete control of the entire server box, so I'll give any suggestions a shot.

--Mark
 
the problem I ususaly see works like this
http://www.mysite.com/subdir
time's out saying server not found, or sometimes a differnet error message depending on how anal the browser is being about the http protocol.
whereas
http://www.mysite.com/subdir/
works fine.

The reason for this is that when apache gets the request for the former (without the trailing /) it actually says "there is no file in here named that, but there is a directory named that so i'm going to redirect you to the correct url (including the trailing /). It then sends the user a redirect. Except here's the tricky part. All the server knows is that it got a request for "/subdir" because http requests are all relative. So when it sends you a redirect it has to concatinate the 1.) ServerName that it is configured to consider itself in http.conf 2.) the request uri it just got (/subdir) and 3.) a trailing /

So in my first example if the ServerName directive were set to "www.mysite.com", the browser would get spit back a redirect to http://www.mysite.com/subdir/

However if the ServerName were improperly configured, for instance to "example.com" the browser would get spit back a redirect to
http://example.com/subdir/

and if that didn't exist, you'd get a browser error. (A common mistake is to configured the ServerName to the IP, this will break things in a name-based virtual host setup).

The reason I said "your problem seems a bit odd/different" is because I can't see why this would be prompting you for a download.

bart
 
Most likely Apache is configured with "Alias /phpBB/ /somewhere/phpBB", remove the trailing slash on the alias, restart Apache and you should be good.
 
Originally posted by: Nothinman
Most likely Apache is configured with "Alias /phpBB/ /somewhere/phpBB", remove the trailing slash on the alias, restart Apache and you should be good.

This is exactly what I had to do when I was using Apache Aliases.

 
Back
Top