Click here to Skip to main content
15,796,456 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using Microsoft URL Rewrite Module and have a problem

1- I need for rewriting to ignore images and css and all other files and directories if possible.
I've tried the following rule but it didn't work
<rule name="Remove trailing slash" stopprocessing="true">
        <match url="(.*)/$" />
            <add input="{REQUEST_FILENAME}" matchtype="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchtype="IsDirectory" negate="true" />
        <action type="Redirect" redirecttype="Permanent" url="{R:1}" />

2- I've added the following rule as my images and css files are in a directory with name "Style"

<rule name="RewriteImages" stopprocessing="true">
        <match url="^Style/(.+)" />
        <action type="Rewrite" url="Style/{R:1}" />

It works fine for 0 and 1 level:

But image is not displayed while using more than one level:

But still the styles in css file is working

Another Question..
Rewriting doesn't work on localhost, I'm using Visual Web Developer Express 2008.

Please help urgently.
Updated 25-Aug-11 19:11pm
Ahmad Safwat 25-Aug-11 13:09pm    

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900