Hi
I'm having trouble with my rewritemap not matching things:
RewriteMap map txt:rewritemaps\map.txt [NC]
RewriteCond ${map:$1|NOT_FOUND} !NOT_FOUND [NC]
RewriteRule ^(.+)$ ${map:$1} [NC, R=301]
The map has about 4,500 entries, including:
arctic /Destinations/Polar-Regions/The-Arctic.aspx
My RewriteLog, set to level 9, logs:
init rewrite engine with requested uri /arctic
Htaccess process request C:\Program Files\ISAPI Rewrite\httpd.conf
Htaccess process request C:\Websites\Path\WebSite\.htaccess
[..]
applying pattern '^(.+)$' to uri 'arctic'
map lookup FAILED: map=map[txt] key=arctic
RewriteCond: input='NOT_FOUND' pattern='NOT_FOUND' =>
It works with pages not in the map - eg /Contact-Us.aspx, but not with stuff which should match (such as arctic). I've tried changing location of the [NC] flag, removing the RewriteCond and renaming the map file (just in case 'map' was a reserved keyword). No joy. It also doesn't seem to be a permissions problem.
FYI, I'm using ISAPIRewrite by Helicontech as I'm on IIS6.
Any help much appreciated!
Thanks, Adam