Elway
Friend of [+35]
Denmark
465 indl�g |
Skrevet - 04 Apr 2006 : 11:16:36
|
har en m8, der arbejder i et PR firma i Århus. De har probs med noget Apache server, rewrite engine gennem en proxy.
Nogen haj der kan hjælpe? - det er nok en røvfuld rødvin at tjene...
Det skal helst være nu/idag...
Elway / a.k.a Morten Lyng 21 21 22 56 / mlyng@saxotech.com
Problemets detaljer: I have a trailing slash problem like the one described and solved in http://forums.devnetwork.net/viewtopic.php?t=45842. BUT my setup is a little different, and that breaks everything. Can't make it work!
I have an Apache2 on 80.160.xx.xx listening to port 80. Sending all requests for none existing Virtual Servers on to http://localhost:8080/, which is an Apache1.3 server. The apache 1.3 handles all my old websites on PHP4.
It works pretty well, all except for the trailing slash. When I write www.test.dk/tester AND /tester is a directory it wont recognize it as such and throws a 404.
My setup on the Apache1.3 server looks like this:
vhost for www.test.dk:
Code: <VirtualHost *:8080> SSLDisable DocumentRoot /web/www.test.dk/www ServerName www.test.dk ServerAlias test.dk RewriteEngine On RewriteLog "/usr/local/apache/logs/rewrite.log" RewriteLogLevel 2 RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !(.*)/$ RewriteRule ^(.*)$ http://%{HTTP_HOST}$1/ [R,L] DirectoryIndex index.html index.htm index.php index.php3 index.phtml <Directory "/web/www.butterflies.dk/"> Options +IncludesNOEXEC </Directory> </VirtualHost>
The log gives me the following:
Code: 127.0.0.1 - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#81e006c/initial] (2) init rewrite engine with requested uri /tester 127.0.0.1 - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#81e006c/initial] (2) rewrite /tester -> http://www.test.dk/tester/ 127.0.0.1 - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#81e006c/initial] (2) explicitly forcing redirect with http://www.test.dk/tester/ 127.0.0.1 - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#81e006c/initial] (1) escaping http://www.test.dk/tester/ for redirect 127.0.0.1 - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#81e006c/initial] (1) redirect to http://www.test.dk/tester/ [REDIRECT/302] localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#81e006c/initial] (2) init rewrite engine with requested uri /tester/ localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#81e006c/initial] (1) pass through /tester/ localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#832784c/subreq] (2) init rewrite engine with requested uri /tester/index.html localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#832784c/subreq] (1) pass through /tester/index.html localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#8245714/initial/redir#1] (2) init rewrite engine with requested uri /tester/index.html localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#8245714/initial/redir#1] (2) rewrite /tester/index.html -> http://www.test.dk/tester/index.html/ localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#8245714/initial/redir#1] (2) explicitly forcing redirect with http://www.test.dk/tester/index.html/ localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#8245714/initial/redir#1] (1) escaping http://www.test.dk/tester/index.html/ for redirect localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#8245714/initial/redir#1] (1) redirect to http://www.test.dk/tester/index.html/ [REDIRECT/302] localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#81e006c/initial] (2) init rewrite engine with requested uri /tester/index.html/ localhost.localdomain - - [04/Apr/2006:11:25:06 +0200] [www.test.dk/sid#820be5c][rid#81e006c/initial] (1) pass through /tester/index.html/
Now my questions: 1. As you can see, the files are appended the trailing slash even though I used the "RewriteCond %{REQUEST_FILENAME} !-f". Why?? 2. There are some subreq and initial and inital/redi in the log - what does that mean? 3. Does anybody now a solution to this?
|
|
Rettet af - Elway @ 04 Apr 2006 12:52:43
|
|