(.*) matching and appending?

Oh, the strange things mod_rewrite does!

(.*) matching and appending?

Postby efaden » Wed Apr 02, 2008 6:16 am

Hey all,

I have basically the following

<VirtualHost>
ServerName www.myserver.com
DocumentRoot /var/www/root

<Directory "/var/www/root">
RewriteEngine On
RewriteRule ^somepath/(.*) somepath2/$1

RewriteRule .... etc.
</Directory>
</VirtualHost>

I have a rewrite rule after the one above to a php page that dumps out all of the REQUEST_URI and the "rewritten" path. The issue is that the rewrite does the following....

Input Path:
www.myserver.com/somepath/test/test2

Output Path
www.myserver.com/somepath2/test/test2/test/test2

I don't really get why? Does anyone have any suggestions?
efaden
 
Posts: 1
Joined: Wed Apr 02, 2008 6:01 am

Postby richardk » Thu Apr 03, 2008 3:40 pm

Post everything you have, and could you also get a RewriteLog of it.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Idiosyncrasies

Who is online

Users browsing this forum: No registered users and 17 guests

cron