httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryan henry <bryan.he...@mail.utexas.edu>
Subject [users@httpd] mod_rewrite on virtual host = bad request :: URL has document root after server name
Date Thu, 06 Mar 2003 19:05:20 GMT
Hello all, I am having a small problem I hope you can help me with. My URL 
rewriting is not working exactly right, placing a document root in the 
middle of the URL. This is on Windows 2000 running Apache 1.3, everythign 
works fine on *nix environments.
thank you for the help, this will make my head feel better.



I am requesting:
http://my.server.com/directory/rewritten/to/vartopass/

Instead of rewriting to:
http://my.server.com/directory/rewritten/to/index.php?rw=vartopass

I am getting:
http://my.server.com/c:/apache/htdocs/directory/rewritten/to/index.php?rw=vartopass
which of course is the source of my bad request.



my.server.com is set up as a virtual host as follows:
<VirtualHost *>
    ServerAdmin me@mail.com
    DocumentRoot C:/Apache/htdocs
    ServerName my.server.com
    ErrorLog logs/com.server.my-error_log
    CustomLog logs/com.server.my-access_log combined env=!worm
</VirtualHost>



.htaccess is a follows:
RewriteEngine On
RewriteBase /directory/rewritten/to/

RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ index.php?rw=$1|$2|$3|$4 [R]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ index.php?rw=$1|$2|$3 [R]
RewriteRule ^([^/]+)/([^/]+)/$ index.php?rw=$1|$2 [R]
RewriteRule ^([^/]+)/$ index.php?rw=$1 [R]




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message