auf meinem Webserver würde ich gerne einen internen rewrite machen, damit oben im Browser immer noch die eigentliche URL angezeigt wird. Leider klappt das irgendwie nicht. Muss ich noch irgendwas dazu einstellen? Hier mal meine config.
Code: Select all
RewriteEngine On
RewriteCond %{REQUEST_URI} !.(gif|jpe?g|png|jspx?|css|js)$
RewriteRule ^/(.*)$ http://localhost/index.jspx?user=$1 [NC,L]
Das klappt aber nicht und ich lande immer auf http://localhost/index.jspx?user=fireball ](*,)
Eine kleine Besonderheit ist wohl noch, dass der Apache alles an einen Tomcat weiterleitet. Aber auch, wenn ich den Tomcat Connector auskommentier funktioniert der Redirect nicht richtig.
Hier das Logfile
Code: Select all
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3dd970/initial] (2) init rewrite engine with requested uri /fireball
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3dd970/initial] (3) applying pattern '^/(.*)$' to uri '/fireball'
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3dd970/initial] (4) RewriteCond: input='/fireball' pattern='!.(gif|jpe?g|png|jspx?|css|js)$' => matched
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3dd970/initial] (2) rewrite '/fireball' -> 'http://localhost/index.jspx?user=fireball'
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3dd970/initial] (3) split uri=http://localhost/index.jspx?user=fireball -> uri=http://localhost/index.jspx, args=referrer=fireball
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3dd970/initial] (2) implicitly forcing redirect (rc=302) with http://localhost/index.jspx
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3dd970/initial] (1) escaping http://localhost/index.jspx for redirect
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3dd970/initial] (1) redirect to http://localhost/index.jspx?user=fireball [REDIRECT/302]
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3e3988/initial] (2) init rewrite engine with requested uri /index.jspx
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3e3988/initial] (3) applying pattern '^/(.*)$' to uri '/index.jspx'
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3e3988/initial] (4) RewriteCond: input='/index.jspx' pattern='!.(gif|jpe?g|png|jspx?|css|js)$' => not-matched
127.0.0.1 - - [18/Jul/2008:23:15:46 +0200] [localhost/sid#39a120][rid#3e3988/initial] (1) pass through /index.jspx
Und warum wird für index.jspx nochmal die Regel aufgerufen? Ich hatte das so verstanden, dass [L] die Riderect Bearbeitung beendet.