httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Ionescu <>
Subject Re: [users@httpd] Rewrite on Windows-server (subdomain)
Date Thu, 02 Mar 2006 21:45:49 GMT
Dennis Madsen wrote:
> I have this rewrite rule:
> RewriteEngine On
> RewriteCond %{HTTP_HOST} ^([^.]+)\.myhp\.dk$
> RewriteCond %{1} !^www$
> RewriteCond c:/www/ -d
> RewriteCond %{REQUEST_FILENAME} !^c:/www/
> RewriteRule (.*) c:/www/$1 [l]

You cannot rewrite to a full physical path in per-dir context (i.e.
.htaccess configuration files, <directory...> and <location...>
sections). mod_rewrite needs an URL-path (e.g. /abc/) here for the
internal redirect.
But mod_rewrite fails here to built such an URL-path (which is always
tried if you don't rewrite directly to an URL-path).

Place your rules in your httpd.conf (=per-server context; if you're
using <virtualhosts..> in the vhost, otherwise outside of <...>-sections.

You should be able to rewrite to a full physical path in per-server context.

IMHO placing directives directly into httpd.conf should be always 
preferred instead of using .htaccess.


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