httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bryan henry <>
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:

Instead of rewriting to:

I am getting:
which of course is the source of my bad request. is set up as a virtual host as follows:
<VirtualHost *>
    DocumentRoot C:/Apache/htdocs
    ErrorLog logs/
    CustomLog logs/ combined env=!worm

.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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message