Answered by:
IIS 7 Url Rewriting & Windows Authentication

Question
-
Hi,
We are trying to use IIS 7 URL Rewrite module to get rid of pages/default.aspx in sharepoint which uses Windows Authentication. But after setting a rule the web application keeps prompting for credentials. But sometimes hitting F5 returns the page content (but again sometimes).
Failed request tracking on IIS says windows authentication module error. I have read in some blogs & forums that IIS 7 URL rewriting is not supported by SharePoint, but i have not read this in any of the Microsoft articles.
Any ideas or alternative solutions would be appreciated.. thanks in advance.
[Update 1] - Got mail from Premium support that 'URL Rewriting' is not supported by SharePoint in any versions. Any alternative solutions are welcome.
Satheesh
http://spsatheesh.wordpress.com- Edited by Satheesh MSFT Monday, May 30, 2011 6:38 AM Update
Monday, May 30, 2011 4:34 AM
Answers
-
Im sorry I can't publish the source since i wrote it for another company.
Basicly what you do is creating a HttpModule that rewrites your optimized url to the original publishing url e.g. http://www.domain.com/sub-site/pages/default.aspx to http://www.domain.com/sub-site/. The original publishing urls will be permanent redirected to the optimized urls. You could implement a response filter that modifies the urls in the html content. SharePoint 2010 do not support response filters due to new IIS 7.0 pipeline. However i posted a workaround for that here http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/86908ade-d2e5-49f1-95ea-31b216807a97/.
There are alot of pitfalls that needs to be handled if you chooce to rewrite e.g. ajax post backs, sharepoint crawling and many others.
The vendor i wrote the solution for sells it as a plugin for SharePoint. I can get their contact information. If you would be interrested. You can see an example of a sharepoint publishing site that runs with url rewrite here : www.falck.dk
- Proposed as answer by sadomovalexMVP Friday, June 3, 2011 9:32 AM
- Marked as answer by Wayne Fan Saturday, June 11, 2011 1:23 AM
Tuesday, May 31, 2011 8:59 AM -
I'm using UrlRewriter.NET is an open-source, light-weight, highly configurable URL rewriting component for ASP.NET 1.1 – 4.0.
Senior Software Developer - Virtosoftware - Premium Web Parts for Microsoft SharePoint 2007 & 2010- Marked as answer by Wayne Fan Saturday, June 11, 2011 1:24 AM
Monday, June 6, 2011 8:02 AM
All replies
-
Monday, May 30, 2011 7:59 AM
-
Sharepoint has own AAM feature which is kind of URL rewrite (although not so flexible). What do you mean by "get rid of pages/default.aspx"? Do you want some kind of custom routing (like in ASP.Net MVC)?
Blog - http://sadomovalex.blogspot.com
CAML via C# - http://camlex.codeplex.com- Marked as answer by GuYuming Monday, June 6, 2011 9:02 AM
- Unmarked as answer by Satheesh MSFT Tuesday, June 7, 2011 6:48 AM
Monday, May 30, 2011 8:12 AM -
Here is my situation..
We have a intranet home page on SharePoint (which if of type publishing portal). Now when users hit http://intranet.company.com they are getting redirected to http://intranet.company.com/pages/default.aspx. So, we don't want to show /pages/default.aspx in the address bar, but still load the default.aspx page just by showing http://intranet.company.com in the address bar.
Satheesh
http://spsatheesh.wordpress.comMonday, May 30, 2011 8:27 AM -
Url rewrite is not supported by SharePoint.
However it is possible to write your own HttpModule that handles rewrite correct. I have done this with a SharePoint SEO solution.
Monday, May 30, 2011 10:09 AM -
Thank you.. you have any documentation on that.. or some information that could be shared at high level.
Satheesh
http://spsatheesh.wordpress.comMonday, May 30, 2011 11:22 AM -
Im sorry I can't publish the source since i wrote it for another company.
Basicly what you do is creating a HttpModule that rewrites your optimized url to the original publishing url e.g. http://www.domain.com/sub-site/pages/default.aspx to http://www.domain.com/sub-site/. The original publishing urls will be permanent redirected to the optimized urls. You could implement a response filter that modifies the urls in the html content. SharePoint 2010 do not support response filters due to new IIS 7.0 pipeline. However i posted a workaround for that here http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/86908ade-d2e5-49f1-95ea-31b216807a97/.
There are alot of pitfalls that needs to be handled if you chooce to rewrite e.g. ajax post backs, sharepoint crawling and many others.
The vendor i wrote the solution for sells it as a plugin for SharePoint. I can get their contact information. If you would be interrested. You can see an example of a sharepoint publishing site that runs with url rewrite here : www.falck.dk
- Proposed as answer by sadomovalexMVP Friday, June 3, 2011 9:32 AM
- Marked as answer by Wayne Fan Saturday, June 11, 2011 1:23 AM
Tuesday, May 31, 2011 8:59 AM -
Thanks Anders,
Do you have suggestions when this module should be in execution cycle in IIS?
Satheesh
http://spsatheesh.wordpress.comSunday, June 5, 2011 6:55 PM -
I'm using UrlRewriter.NET is an open-source, light-weight, highly configurable URL rewriting component for ASP.NET 1.1 – 4.0.
Senior Software Developer - Virtosoftware - Premium Web Parts for Microsoft SharePoint 2007 & 2010- Marked as answer by Wayne Fan Saturday, June 11, 2011 1:24 AM
Monday, June 6, 2011 8:02 AM