IIS url rewrite rewriting all .asp to .html
Posted
by user335711
on Stack Overflow
See other posts from Stack Overflow
or by user335711
Published on 2010-05-07T18:40:44Z
Indexed on
2010/05/07
18:48 UTC
Read the original article
Hit count: 257
urlrewrite
|iis7
I need to create rules for web.config that will rewrite all requests for files with extension .html to .asp and redirect all .asp requests to .html
Example:
file_xyz.asp rewrites to file_xyz.html
directory1/file_xyz.asp rewrites to directory1/file_xyz.html
and
file_xyz.html redirects to file_xyz.asp
directory1/file_xyz.html redirects to directory1/file_xyz.asp
- What is the syntax for the rule
- Is this too broad a rule? If I should need for what ever reason to have a physical file such as file_abc.html how do I exclude it from the redirect rule?
- I am thinking I should just use ISAPI_Rewrite http://www.isapirewrite.com/ there seems to be a ton of resources out there for rewriting with htaccess and very little online help for using IIS 7 URL rewrite. Any thoughts and/or advice
Thanks in advance
© Stack Overflow or respective owner