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

apache2 behind firewall - 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..

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 / and NAT - I'm new to apache. I'm not sure if this is part of the problem but here's the setup... I have a web server behind NAT. This server therefore has an IP address and DNS zone on each network. However, the server has the same DNS hostname on each zone. I.

add slash to virtual dir - how can i add slash to virtual i put this rule in htaccess ([^/]+)/$ and redirect to but return a 404 -- ..

Ending slash in url - Rather common problem with ending slash at end of URL. I can't manage problems, that every time I go to I get error message - Can not display page (in IE), but when I add the / at end of url, is ok. Only way to get some..
Next:  php page generation delayd  
Author Message
user2999

External


Since: Oct 11, 2004
Posts: 3



(Msg. 1) Posted: Mon Oct 11, 2004 8:04 am
Post subject: apache2 behind firewall - trailing slash
Archived from groups: alt>apache>configuration (more info?)

Hello together!
I have the following situation:
Internet ------- Server ---------intraServer

Server has external name hhbgate.bonn.de
intraServer has only internal name (www.hhb.bonn.de) and
only a local ip.

on Server I use:
<VirtualHost *:80>
ServerName hhbgate.bonn.de
ServerAdmin roemke RemoveThis @hhb.bonn.de
ServerSignature On
UseCanonicalName Off
RewriteEngine On
RewriteRule ^/(.*) http://www.hhb.bonn.de/$1 [L,P]
TransferLog /var/log/apache2/www-access_log
ErrorLog /var/log/apache2/www-error_log
</VirtualHost>

this configuration works, but not for the trailing
slash problem, so I tried on the intraServer
#rewrite-rule for trailing slash problem, test on dir
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R]

If I try http://hhbgate.bonn.de/fnt/ it works,
if I try http://hhbgate.bonn.de/fnt
it leads to the error http://www.hhb.bonn.de/fnt/
not found (no difference, if I use the rewrite rule on the
intraServer www.hhb.bonn.de or if I switch it off)

Hmm, I think that I don't understand rewriting - can anybody
give me a hint, where I found an explanation of this problem?
I thought it must be a standard problem?

Thanks
Karsten

 >> Stay informed about: apache2 behind firewall - trailing slash 
Back to top
Login to vote
user614

External


Since: Oct 01, 2004
Posts: 117



(Msg. 2) Posted: Mon Oct 11, 2004 6:22 pm
Post subject: Re: apache2 behind firewall - trailing slash [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

why not just use the ProxyPass syntax=20
"Karsten Roemke" <k.roemke DeleteThis @gmx.de> wrote in message =
news:566946fb.0410110404.1b269451@posting.google.com...
 > Hello together!
 > I have the following situation:
 > Internet ------- Server ---------intraServer
 >=20
 > Server has external name hhbgate.bonn.de
 > intraServer has only internal name (www.hhb.bonn.de) and=20
 > only a local ip.
 >=20
 > on Server I use:
 > <VirtualHost *:80>
 > ServerName hhbgate.bonn.de
 > ServerAdmin roemke DeleteThis @hhb.bonn.de
 > ServerSignature On
 > UseCanonicalName Off
 > RewriteEngine On
 > RewriteRule ^/(.*) <a style='text-decoration: underline;' href="http://www.hhb.bonn.de/$1" target="_blank">http://www.hhb.bonn.de/$1</a> [L,P]
 > TransferLog /var/log/apache2/www-access_log
 > ErrorLog /var/log/apache2/www-error_log
 > </VirtualHost>
 >=20
 > this configuration works, but not for the trailing
 > slash problem, so I tried on the intraServer
 > #rewrite-rule for trailing slash problem, test on dir
 > RewriteEngine On
 > RewriteCond %{REQUEST_FILENAME} -d
 > RewriteRule ^(.+[^/])$ $1/ [R]
 >=20
 > If I try <a style='text-decoration: underline;' href="http://hhbgate.bonn.de/fnt/" target="_blank">http://hhbgate.bonn.de/fnt/</a> it works,
<font color=purple> > if I try <a style='text-decoration: underline;' href="http://hhbgate.bonn.de/fnt</font" target="_blank">http://hhbgate.bonn.de/fnt</font</a>>
<font color=purple> > it leads to the error <a style='text-decoration: underline;' href="http://www.hhb.bonn.de/fnt/</font" target="_blank">http://www.hhb.bonn.de/fnt/</font</a>>
 > not found (no difference, if I use the rewrite rule on the=20
 > intraServer <a style='text-decoration: underline;' href="http://www.hhb.bonn.de" target="_blank">www.hhb.bonn.de</a> or if I switch it off)=20
 >=20
 > Hmm, I think that I don't understand rewriting - can anybody
 > give me a hint, where I found an explanation of this problem?
 > I thought it must be a standard problem?
 >=20
 > Thanks=20
 > Karsten<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: apache2 behind firewall - trailing slash 
Back to top
Login to vote
hans1

External


Since: Mar 29, 2004
Posts: 672



(Msg. 3) Posted: Mon Oct 11, 2004 11:22 pm
Post subject: Re: apache2 behind firewall - trailing slash [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Karsten Roemke" <k.roemke.DeleteThis@gmx.de> schreef in bericht
news:566946fb.0410110404.1b269451@posting.google.com...
 > Server has external name hhbgate.bonn.de
 > intraServer has only internal name (www.hhb.bonn.de) and
 > only a local ip.
 > on Server I use:
 > <VirtualHost *:80>
[snipped]
</VirtualHost>
 > this configuration works, but not for the trailing
 > slash problem, so I tried on the intraServer
 > #rewrite-rule for trailing slash problem, test on dir
 > RewriteEngine On
 > RewriteCond %{REQUEST_FILENAME} -d
 > RewriteRule ^(.+[^/])$ $1/ [R]
 >
 > If I try <a style='text-decoration: underline;' href="http://hhbgate.bonn.de/fnt/" target="_blank">http://hhbgate.bonn.de/fnt/</a> it works,
<font color=purple> > if I try <a style='text-decoration: underline;' href="http://hhbgate.bonn.de/fnt</font" target="_blank">http://hhbgate.bonn.de/fnt</font</a>>
<font color=purple> > it leads to the error <a style='text-decoration: underline;' href="http://www.hhb.bonn.de/fnt/</font" target="_blank">http://www.hhb.bonn.de/fnt/</font</a>>
 > not found (no difference, if I use the rewrite rule on the
 > intraServer <a style='text-decoration: underline;' href="http://www.hhb.bonn.de" target="_blank">www.hhb.bonn.de</a> or if I switch it off)
 >
 > Hmm, I think that I don't understand rewriting - can anybody
 > give me a hint, where I found an explanation of this problem?
Move those rewrite directives inside the virtual host block.

It seems some versions -or (re)ditributions- of Apache mistickly ignore
rewrite directives in server context if at least one virtual host block is
active.

Consider using mod_dir instead:
<a style='text-decoration: underline;' href="http://httpd.apache.org/docs-2.1/mod/mod_dir.html" target="_blank">http://httpd.apache.org/docs-2.1/mod/mod_dir.html</a>
'Provides for "trailing slash" redirects and serving directory index files'

HansH<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache2 behind firewall - trailing slash 
Back to top
Login to vote
user2999

External


Since: Oct 11, 2004
Posts: 3



(Msg. 4) Posted: Wed Oct 13, 2004 3:23 pm
Post subject: Re: apache2 behind firewall - trailing slash [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Hans
 > Move those rewrite directives inside the virtual host block.
hmm, I have no virtual host on the intra-Server.
 >
 > It seems some versions -or (re)ditributions- of Apache mistickly ignore
 > rewrite directives in server context if at least one virtual host block is
 > active.
I can't imagine that that's the reason, cause I compiled a relatively new
version:
Server version: Apache/2.0.51
Server built: Sep 25 2004 10:28:15
I take it from apache.org on Sep 25.
mod_rewrite is compiled in.
 >
 > Consider using mod_dir instead:
<font color=purple> > <a style='text-decoration: underline;' href="http://httpd.apache.org/docs-2.1/mod/mod_dir.html</font" target="_blank">http://httpd.apache.org/docs-2.1/mod/mod_dir.html</font</a>>
 > 'Provides for "trailing slash" redirects and serving directory index files'
I will look for this and for proxyPass
Hope I find the time next weekend.
Thank you
Karsten<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache2 behind firewall - trailing slash 
Back to top
Login to vote
user2999

External


Since: Oct 11, 2004
Posts: 3



(Msg. 5) Posted: Thu Oct 14, 2004 3:45 am
Post subject: Re: apache2 behind firewall - trailing slash [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Poster Smile

"Newsgroup Poster" <dont.need DeleteThis @my.address.ok> wrote in message news:<cke4uj$n0j$1$830fa7a5@news.demon.co.uk>...
 > why not just use the ProxyPass syntax
I thought I use it. I remember, that I first tried it only with proxy-pass
and run into problems - sorry I forget them.
No I'm using
  > > RewriteRule ^/(.*) <a style='text-decoration: underline;' href="http://www.hhb.bonn.de/$1" target="_blank">http://www.hhb.bonn.de/$1</a> [L,P]
The option P means to enable the reverse proxy - I think so?
Thanks
Karsten<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: apache2 behind firewall - 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 ]