Forum Moderators: phranque
I'v got a problem regarding traling slashes. If i browse to [domain.ex...] it gives me the index in ~/test/ but when i browse to [domain.ex...] the proxy server gives out a 404 error.
The network is build this way:
The apache proxy (10.0.0.2) code:
<VirtualHost *>
Servername domain.ex
ProxyRequests Off
ProxyVia Off
NoCache *
ProxyPass / http://domain.ex/
ProxyPassReverse / http://domain.ex/
</VirtualHost>
The code at the proxyed server (10.0.0.5):
<VirtualHost *>
DirectoryIndex index.htm index.html index.php index.phtmlRewriteEngine on
RewriteMap lowercase int:tolower
RewriteMap vhost txt:/foo/bar/vhost.map
RewriteCond %{HTTP_HOST}!^$
RewriteCond ${lowercase:%{HTTP_HOST}¦NONE} ^(.+)$
RewriteCond ${vhost:%1} ^(/.*)$
RewriteRule ^/(.*)$ %1/$1
</VirtualHost>
I'v been working on this problem for about 2 weeks now, i'v had all of google and this forum.
I understand mod_rewrite a bit, but i'm not an expert.
Could some one please help me, thanks :)
Welcome to WebmasterWorld!
/dir/test/ refers to the index file, such as /dir/test/index.php, as defined by DirectoryIndex.
/dir/test refers to the extensionless file "test" in the /dir subdirectory. So 404 is the correct response if no such file exists.
Apache mod_dir usually corrects directory index requests made with missing trailing slashes, so the question is, why is mod_dir not doing its job on your server?
If mod_dir is (for some strange reason) not available, mod_negotiation could also be used.
Jim