Apache rewrite map to text file
Hi,
i am trying to get this rewrite using a text file to work but it seems not to pick up the text or read it the way i want. here is what is happening i want to merge 2 domains .com and .net into one vhost file and one website. but the .net has alot of redirects which i want to put in a txt file bacuse there are over 200 line of redirects static.also exclude the robots.txt file. and i want the rule to look for any string be it after the first slash of with the url like so www.site.net/wsd/html/aboutus.html or www.site.net/bbb/wsd/html/aboutus.html should use the map text file and rewrite. txt file example wsd/html/aboutus.html /aboutus wsd/html/aboutus.htm /aboutus wsd/html/aboutus.php /aboutus RewriteMap links txt:/var/www/bin/rewritemap1.txt RewriteCond $1 !robot.txt$ RewriteRule ^/(.*) ${links:$1|http://www.site.com/} [R=301,L] i have googled and tried so many regex none seem to work. thanks |
I don't see anything wrong with your example. Can you see if there
are any entries in your apache error log file? |
All times are GMT -5. The time now is 07:29 PM. |