Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Host with trailing slash

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
trailing slash error - I have recently seen trailing slash errors in my error logs...I am not the admin of the site but am wondering if there is a there is some sort of Apache bug that is causing this or is it a simple error? Thanks Cheers, -sd..

trailing slash + extension - Hi there, I have a site where is reWRITTEN to Only that url stays hidden from the visitor. Now i need to have a htaccess rewrite rule that reDIRECTS all urls that don't end on a slash or on .html to the url with

apache2 behind firewall - trailing slash - Hello together! I have the following Internet ------- Server Server has external name has only internal name and only a local ip. on Server I use: *:80> ..

Can't get "trailing slash" redirection in mod_dir to work - Hi there! I need some help with the slash funktion in mod_dir. I'm using Apache v2.0.50 with Linux. mod_dir.c is compiled. For proof: # httpd -l Compiled in modules: [...] mod_cgi.c ..

trailing-slash redirect uses wrong server name (but only i.. - Hi, I have an apache 1.3.33 on Redhat 7.3. It runs 1 site plus an SSL version of the site on port 433 The problem I have is that when I go to I get to
Next:  Apache: Allow Web Services  
Author Message
Russell Bell

External


Since: Oct 27, 2007
Posts: 2



(Msg. 1) Posted: Sat Oct 27, 2007 4:03 am
Post subject: Host with trailing slash
Archived from groups: alt>apache>configuration (more info?)

We're hosting a website for customer using named virtual hosting,
which works fine except for one problem. The customer says they
can't access the website home page (www.xxx.co.nz)
from certain PC's. The browser gets a "Directory index forbidden by rule"
error.

If they use a URL of "www.xxx.co.nz/index.htm" it
works fine. But naturally they want the simpler URL to work also.

Going by the access log (below) the problem seems to be that the
http host header has a trailing slash. So Apache thinks it should
do a directory listing, which is forbidden.

Of course I don't want a directory listing, I want Apache to use
DirectoryIndex (index.htm). How can I bend Apache to my will in
this circumstance ?

We're running Apache 2.0.50 on Mandrake. Here's the access.log
and error.log entries (with customer name and IP xxx):


x.x.x.x [23/Oct/2007:13:29:40 +1300] "www.xxx.co.nz/"
398 "GET / HTTP/1.0" Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322)

[Tue Oct 23 13:29:40 2007] [error] [client x.x.x.x]
Directory index forbidden by rule: /var/www/html/xxx/

The Vhosts.conf entry is:

<VirtualHost *:80>
ServerName xxx.co.nz
ServerAlias xxx.co.nz *.xxx.co.nz xxx.com *.xxx.com
DocumentRoot /var/www/html/xxx
DirectoryIndex /index.htm
</VirtualHost>

 >> Stay informed about: Host with trailing slash 
Back to top
Login to vote
HansH

External


Since: Dec 08, 2006
Posts: 112



(Msg. 2) Posted: Sat Oct 27, 2007 4:03 am
Post subject: Re: Host with trailing slash [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Russell Bell" <rb RemoveThis @fastbase.co.nz> schreef in bericht
news:fftt9b$cdf$1@aioe.org...
> We're hosting a website for customer using named virtual hosting,
> which works fine except for one problem. The customer says they
> can't access the website home page (www.xxx.co.nz)
> from certain PC's. The browser gets a "Directory index forbidden by rule"
> error.
>
> x.x.x.x [23/Oct/2007:13:29:40 +1300] "www.xxx.co.nz/"
> 398 "GET / HTTP/1.0" Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
> SV1; .NET CLR 1.1.4322)
>
> [Tue Oct 23 13:29:40 2007] [error] [client x.x.x.x]
> Directory index forbidden by rule: /var/www/html/xxx/
>
Like to know your logformat for better understanding.

For now it seems those PC are using HTTP/1.0, thus do NOT send a host header
at all. Without a hostheader the default -first defined- vhost is
responding.

Most likely those PC fall back to HTTP/1.0 while using a proxy :
Check under Tools -> Options -> Advanced


HansH

 >> Stay informed about: Host with trailing slash 
Back to top
Login to vote
shimmyshack

External


Since: Jun 07, 2007
Posts: 70



(Msg. 3) Posted: Sat Oct 27, 2007 1:58 pm
Post subject: Re: Host with trailing slash [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Oct 27, 2:38 am, "HansH" <ha....RemoveThis@invalid.invalid> wrote:
> "Russell Bell" <r....RemoveThis@fastbase.co.nz> schreef in berichtnews:fftt9b$cdf$1@aioe.org...> We're hosting a website for customer using named virtual hosting,
> > which works fine except for one problem. The customer says they
> > can't access the website home page (www.xxx.co.nz)
> > from certain PC's. The browser gets a "Directory index forbidden by rule"
> > error.
>
> > x.x.x.x [23/Oct/2007:13:29:40 +1300] "www.xxx.co.nz/"
> > 398 "GET / HTTP/1.0" Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
> > SV1; .NET CLR 1.1.4322)
>
> > [Tue Oct 23 13:29:40 2007] [error] [client x.x.x.x]
> > Directory index forbidden by rule: /var/www/html/xxx/
>
> Like to know your logformat for better understanding.
>
> For now it seems those PC are using HTTP/1.0, thus do NOT send a host header
> at all. Without a hostheader the default -first defined- vhost is
> responding.
>
> Most likely those PC fall back to HTTP/1.0 while using a proxy :
> Check under Tools -> Options -> Advanced
>
> HansH

do you use some rewrites for your customers which results in the host
being modified from
www.xxx.co.nz
to
www.xxx.co.nz/

that would appear to be non-standard.

and yes your log format suggests http/1.0 and the fact that your log
file doesnt record the host accurately suggests that you are setting
it using some rules in the httpd conf when http/1.0 is used over
proxies but getting it slightly wrong.
 >> Stay informed about: Host with trailing slash 
Back to top
Login to vote
Russell Bell

External


Since: Oct 27, 2007
Posts: 2



(Msg. 4) Posted: Tue Oct 30, 2007 2:01 am
Post subject: Re: Host with trailing slash [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I thought "host" was simply optional for HTTP 1.0 clients -
they can still send a host header if they want.

In this situation the client's website isn't the first vhost in
Vhosts.conf, it's in the middle of the file. So I think the
client PC must be sending a host header.

We don't have any rewrites in our config. Could I use a rewrite
to get rid of the trailing slash ? I'm not familiar with using
URL rewrites.

Russell

shimmyshack wrote:
> On Oct 27, 2:38 am, "HansH" <ha....TakeThisOut@invalid.invalid> wrote:
>> "Russell Bell" <r....TakeThisOut@fastbase.co.nz> schreef in berichtnews:fftt9b$cdf$1@aioe.org...> We're hosting a website for customer using named virtual hosting,
>>> which works fine except for one problem. The customer says they
>>> can't access the website home page (www.xxx.co.nz)
>>> from certain PC's. The browser gets a "Directory index forbidden by rule"
>>> error.
>>> x.x.x.x [23/Oct/2007:13:29:40 +1300] "www.xxx.co.nz/"
>>> 398 "GET / HTTP/1.0" Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;
>>> SV1; .NET CLR 1.1.4322)
>>> [Tue Oct 23 13:29:40 2007] [error] [client x.x.x.x]
>>> Directory index forbidden by rule: /var/www/html/xxx/
>> Like to know your logformat for better understanding.
>>
>> For now it seems those PC are using HTTP/1.0, thus do NOT send a host header
>> at all. Without a hostheader the default -first defined- vhost is
>> responding.
>>
>> Most likely those PC fall back to HTTP/1.0 while using a proxy :
>> Check under Tools -> Options -> Advanced
>>
>> HansH
>
> do you use some rewrites for your customers which results in the host
> being modified from
> www.xxx.co.nz
> to
> www.xxx.co.nz/
>
> that would appear to be non-standard.
>
> and yes your log format suggests http/1.0 and the fact that your log
> file doesnt record the host accurately suggests that you are setting
> it using some rules in the httpd conf when http/1.0 is used over
> proxies but getting it slightly wrong.
>
 >> Stay informed about: Host with trailing slash 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]