rewritemap matching not working

New to mod_rewrite? This is a good place to start.

rewritemap matching not working

Postby alinux » Fri Jun 26, 2009 5:20 am

hi all got a rewrite map issue..using a text file for mappng but does not seem to match as I want it to ...rewrite statement at http://pastebin.com/m50a4d3ff
alinux
 
Posts: 8
Joined: Tue Jun 16, 2009 5:15 am

Postby richardk » Fri Jun 26, 2009 9:02 am

Why did you post it at pastebin?
http://pastebin.com/m50a4d3ff wrote:
Code: Select all
RewriteCond ${rewritemap:%{REMOTE_ADDR}} ok
RewriteRule !^redirect.php$ http://%{HTTP_HOST}%{REQUEST_URI} [P,L]


Apache.conf contains
Code: Select all
RewriteMap testmap txt:/var/www/testmap.txt


testmap.txt contains
Code: Select all
192.168.0.182 ok


When I do a request from 192.168.0.182 it is not being matched..what have I mised here ?

You call the map "testmap" but when you use the map you use "rewritemap". They should both be the same.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 7 guests

cron