- Code: Select all
RewriteMap txtmap txt:/etc/httpd/conf/urlmap.txt
RewriteCond ${txtmap:$1|not_found} ^(.+)
RewriteCond %1 !^not_found$
RewriteRule ^/(.*) /%1 [R=301,L]
My urlmap.txt file looks like:
- Code: Select all
AAA BBB
This works:
http://machine/AAA --> http://machine/BBB
This doesn't:
http://machine/AAA/anything --> http://machine/BBB/anything
What do I need to change to get the stuff after the 'AAA' to be caught and appended to the rewritten URL?