tags:

views:

77

answers:

1

I have the following

RewriteMap mapfile txt:D:\mysite\urls.txt
RewriteRule ^([^?/]+)\.htm  /vehicle.aspx?e=${mapfile:$1} [QSA]
RewriteRule ^(.*)\.htm $1\.aspx

Now my problem is, I want to make the url's look like this for the /vehicles.aspx page (Which I am reading from a file)

/my-chevrolet-camaro.htm

Which is working fine - The problem I have now is if any of the REAL pages in the root are browsed to it throws a page not found?? For example

default.htm

Would throw a 404!! What syntax do I need to say check the list and then just carry on as normal?

A: 

Your last rule, i.e.,

RewriteRule ^(.*)\.htm $1\.aspx

maps *.htm to *.aspx.

This would mean that default.htm would be rewritten to default.aspx. If you don't have a default.aspx, then a 404 would be thrown. Does that help?

Umar Farooq Khawaja