views:

66

answers:

1

Hello,

I want to implement the mapping issue of this tool and I cannot make it work. This is the rule:

RewriteBase /
RewriteMap mapfile txt:mapfile.txt
RewriteRule /([^?/]+)\.asp /Products.asp?Prod=${mapfile:$1}

For example, I want every file on my website which is in this format: /products.asp?prod=2

  • replaced with /LAW
  • or at least /products-LAW

I created a map file called mapfile.txt, placed it at the root web files along with the .htaccess file. I wrote only one line

law 2

and nothing happens.

What am I doing wrong?

Thanks!

A: 

I believe you have the variables in your map file the wrong way round. The first var is the match, the second is the replace:

2   law
adam