httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Madsen" <den...@demaweb.dk>
Subject [users@httpd] Rewrite on Windows-server (subdomain)
Date Thu, 02 Mar 2006 17:06:22 GMT
I have this rewrite rule:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+)\.myhp\.dk$
RewriteCond %{1} !^www$
RewriteCond c:/www/myhp.dk/www/%1 -d
RewriteCond %{REQUEST_FILENAME} !^c:/www/myhp.dk/www/
RewriteRule (.*) c:/www/myhp.dk/www/%1/$1 [l]

It's placed in my .htaccess on  <http://www.myhp.dk> http://www.myhp.dk.

When I visit myhp.dk it works but when I try to visit ns-ekstra.myhp.dk e.g.
I get this error:

You don't have permission to access /c:/www/myhp.dk/www/ns-ekstra/ on this
server.

Can anybody help me to get this rewrite work?
I would like to lead users who vist asubdomain.myhp.dk to
myhp.dk/asubdomain.

 

I get this error in my log:

80.164.67.235 - - [02/Mar/2006:14:18:35 +0100]
[admin.myhp.dk/sid#602558][rid#c52b38/initial] (3) [per-dir
C:/www/myhp.dk/www/] strip per-dir prefix: C:/www/myhp.dk/www/ -> 
80.164.67.235 - - [02/Mar/2006:14:18:35 +0100]
[admin.myhp.dk/sid#602558][rid#c52b38/initial] (3) [per-dir
C:/www/myhp.dk/www/] applying pattern '(.*)' to uri ''
80.164.67.235 - - [02/Mar/2006:14:18:35 +0100]
[admin.myhp.dk/sid#602558][rid#c52b38/initial] (2) [per-dir
C:/www/myhp.dk/www/] rewrite  -> c:/www/myhp.dk/www/admin/
80.164.67.235 - - [02/Mar/2006:14:18:35 +0100]
[admin.myhp.dk/sid#602558][rid#c52b38/initial] (3) [per-dir
C:/www/myhp.dk/www/] add per-dir prefix: c:/www/myhp.dk/www/admin/ ->
C:/www/myhp.dk/www/c:/www/myhp.dk/www/admin/
80.164.67.235 - - [02/Mar/2006:14:18:35 +0100]
[admin.myhp.dk/sid#602558][rid#c52b38/initial] (2) [per-dir
C:/www/myhp.dk/www/] strip document_root prefix:
C:/www/myhp.dk/www/c:/www/myhp.dk/www/admin/ -> /c:/www/myhp.dk/www/admin/
80.164.67.235 - - [02/Mar/2006:14:18:35 +0100]
[admin.myhp.dk/sid#602558][rid#c52b38/initial] (1) [per-dir
C:/www/myhp.dk/www/] internal redirect with /c:/www/myhp.dk/www/admin/
[INTERNAL REDIRECT]

It's easy to see that the rewrite make a mistake and end up with:
/c:/www/myhp.dk/www/admin/

It should just be:
c:/www/myhp.dk/www/admin/

 


Mime
View raw message