Clan [+35] Forum
Clan [+35] Forum
[+35] Hovedkvarter | Profil | Tilmeld | Aktive emner | Forummedlemmer | S�gning | FAQ
 Alle fora
 Computere
 [+35] Linux
 help wanted: Apache server, rewrite engine gennem

Note: Du skal være tilmeldt for at skrive indlæg.
Tilmeld dig her. Tilmelding er gratis!

Skærmstørrelse:
Brugernavn:
Kodeord:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Tekst:

* HTML er slået FRA
* Forum-koder er slået TIL
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

E M N E    VISNING
Elway Posted - 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?
1   N Y E S T E    I N D L Æ G    (Nyeste først)
DecoChi Skrevet - 05 Apr 2006 : 20:42:34
En af mine linux venner anbefaler at spørge inde på denne side:

http://linuxin.dk/ der
plejer altid at være en` apache haj eller tyve.

Clan [+35] Forum © 2000-2002 Snitz Communications Go To Top Of Page
Tilpasset ældre læsere - vist på [:)] 0.17 sek. Snitz Forums 2000