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

x
?
Solved

IIS 7 URL Rewrite Module

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


When i apply the above rule the page is redirecting and rewriting like below:
http://192.168.1.5/ragadirect/Fundamental/LiveQuotes/11100025.00

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

http://192.168.1.5/ragadirect/Fundamental/LiveQuotes/images/company-info-menu-title.gif

Instead of
http://192.168.1.5/ragadirect/images/company-info-menu-title.gif (Correct Path)

If Not clear find the attachment for your reference.

Awaiting for reply..Thanks for Advance.
Doc1.docx
0
Comment
Question by:senthilramasubbu
  • 3
  • 2
6 Comments
 
LVL 51

Expert Comment

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

Author Comment

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

Expert Comment

by:Steve Bink
ID: 38328996
Start failed request tracing, and post an example of a request being rewritten incorrectly.
0
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

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

Accepted Solution

by:
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.
0
 
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.
0

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