troubles with the <Directory> directive

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 27 Oct 2015, 08:02

troubles with the <Directory> directive

27 Oct 2015, 08:04

Dear board members,

I'm having troubles with the <Directory> directive. This is my (global) httpd.conf:

RegistrationName= WebRegio Development
RegistrationCode= *****-*****-*****-*****
RewriteEngine On
RewriteLog "D:\Projects\Ontwikkelingen\Asp\IsapiRewrite\rewrite.log"
RewriteLogLevel 9

ErrorLog "D:\Projects\Ontwikkelingen\Asp\IsapiRewrite\error.log"
LogLevel debug

<Directory D:/Projects/Ontwikkelingen/Asp/IsapiRewrite/site1/>
RewriteRule /pag1\.htm /pag2.htm [R=301,L]
</Directory>
<Directory ~ "D:/Projects/Ontwikkelingen/Asp/IsapiRewrite/site1/.*/">
RewriteRule /pag1\.htm /pag2.htm [R=301,L]
</Directory>
...other rules...

But "pag1.htm" is not being redirected to pag2.htm. The "other rules" after the directory tags are being processed. And if I remove the <directory> tags it's working fine.

The rewrite.log and error.log contain no info:

Error.log:
[23-10-2015 12:07:54] C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf - Loaded successfully
Rewrite.log:
127.0.0.1 127.0.0.1 Fri, 23-Oct-2015 12:07:54 GMT [site1.djdev.nl/sid#79][rid#718767712888/initial] (2) init rewrite engine with requested uri /pag1.htm
127.0.0.1 127.0.0.1 Fri, 23-Oct-2015 12:07:54 GMT [site1.djdev.nl/sid#79][rid#718767712888/initial] (1) Htaccess process request C:\Program Files\Helicon\ISAPI_Rewrite3\httpd.conf

What am I'm doing wrong here? Can someone please provide me with a working example?

Thanks!
Dave

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 9 guests