[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


IIS 7 URL Rewrite Module

Posted on 2012-08-22
Medium Priority
Last Modified: 2013-01-27
<rule name="RedirectUserFriendlyURL1" stopProcessing="true">
          <match url="^Fundamental\.aspx$" />
            <add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
            <add input="{QUERY_STRING}" pattern="^pagename=([^=&amp;]+)&amp;companycode=([^=&amp;]+)$" />
          <action type="Redirect" url="Fundamental/{C:1}/{C:2}" appendQueryString="false" />
        <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
          <match url="^Fundamental/([^/]+)/([^/]+)/?$" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
          <action type="Rewrite" url="Fundamental.aspx?pagename={R:1}&amp;companycode={R:2}" />

When i apply the above rule the page is redirecting and rewriting like below:

But all the images path also taking like below after applying above rule:

Instead of (Correct Path)

If Not clear find the attachment for your reference.

Awaiting for reply..Thanks for Advance.
Question by:senthilramasubbu
  • 3
  • 2
LVL 51

Expert Comment

by:Steve Bink
ID: 38326122
Are you using relative URLs in the src attributes of your <img> elements?

Author Comment

ID: 38328301
I am not given the relative URL . It is taking by default.
LVL 51

Expert Comment

by:Steve Bink
ID: 38328996
Start failed request tracing, and post an example of a request being rewritten incorrectly.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Author Comment

ID: 38330319
Thanks for sharing.  Please correct the code and send to me..
LVL 51

Accepted Solution

Steve Bink earned 2000 total points
ID: 38331503
You will need to start failed request tracing on your server to obtain a log of how IIS is acting on these rules.  Upload a sample of that log.
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 38823902
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question