IIS Loading Rewritten URLs Twice
-
I have a C#/.NET Application on IIS. I am rewriting the URLs via http://www.isapirewrite.com/. The rewritten URLs are all loading twice. ISAPI Rewrite's creators http://www.helicontech.com/forum/forum_posts.asp?TID=5325&TPN=1, but visiting the non-rewritten URL, the page only loads once. What could be causing this? The HttpModule contains a PreRequestHandlerExecute event that should be happening (AFAIK) after the ISAPI filter gets hit, but attaching to the event in the debugger shows two requests for rewritten urls, one for non-rewritten urls. I've never had this problem before, but then I've never (consider this a red flag, I suppose) written an HttpModule before or been as concerned with performance in an app*. In rough numbers, it looks like solving this problem would give me a 50% performance increase. Obviously I've been concerned with app performance before, but this is the largest app by far.
-
Answer:
Don't know what your problem is, but if you want to try an alternative, you can also handle the rewrite for your .aspx pages in Global.asax.cs by tweaking the path in the Application_BeginRequest() method. More http://www.theukwebdesigncompany.com/articles/search-engine-friendly-urls-asp.php.
yerfatma at Ask.Metafilter.Com Visit the source
Related Q & A:
- How to get correct URLs in network wide menu (Multisite?Best solution by WordPress
- How to redirect custom urls to some local IPs with pfSense?Best solution by stackoverflow.com
- How do I do cron job for list of URLS?Best solution by Stack Overflow
- How to I redirect URLS with special characters in htaccess?Best solution by Server Fault
- Google Indexed URLs Going Down?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.