Forum Moderators: phranque
I have a Windows box running Apache 2.2.4. I needed to do a URL rewriting to allow authenticated users to their own directories. But, The RewriteMap program specified in my httpd.conf never gets launched.
Please see my earlier posting in the forum (http://www.webmasterworld.com/apache/3455217.htm#msg3461537) to know the history of the issue.
If any one using RewriteMap prg: directive on Windows has a clue about this, please help me.
For ready reference here is the relevant portion of my httpd.conf
---------------------------------
Alias /vfolders "D:\vfolders"
RewriteLog logs/rewrite.log
RewriteLogLevel 9
RewriteMap testmap "prg:c:/Apache2/bin/rewritemap.exe"
<Directory "D:/vfolders>
Options Indexes Multiviews FollowSymLinks
Order allow,deny
Allow from all
AuthType Basic
AuthName "Nothing"
AuthBasicProvider file
AuthUserFile conf/passwd
Require valid-user
RewriteEngine on
RewriteBase /vfolders/
RewriteCond ${testmap:%{REQUEST_URI}:%{REMOTE_USER}}^REWRITE$[NC]
RewriteRule ^.*$/vfolders/%{REMOTE_USER}[R,L,NS]
</Directory>
------------------------
Regards
Sunil
I could get the RewriteMap program to run, but...
RewriteMap program is kicked off IFF the "RewriteEngine On" directive is OUTSIDE <Directroy></Directory> as below :
-------------------
RewriteMap testmap "prg:c:/perl/bin/perl.exe c:/Apache2/bin/rewritemap.pl"
RewriteEngine On
<Directory "D:/vfolders>
Options Indexes Multiviews FollowSymLinks
Order allow,deny
Allow from all
AuthType Basic
AuthName "Nothing"
AuthBasicProvider file
AuthUserFile C:/apache2/conf/passwd
Require valid-user
RewriteEngine On
RewriteBase /vfolders/
RewriteCond ${testmap:%{REQUEST_URI}:%{REMOTE_USER}}^REWRITE$[NC]
RewriteRule ^.*$/vfolders/%{REMOTE_USER}[R,L,NS]
</Directory>
----------------
Besides, without the second "RewriteEngine On" before RewriteCondition, rewriting is not attempted.
However, the rewrite script does NOT receive any input from Apache! So, when ever the map program is being used, Apache blocks till rewrite program is killed.
In short, I am still unable to use the rewritemap program!
Sunil