7

I have a site collection with URL https://MySharepoint.Dev.com/default.aspx.

I just want to know if some one browses to this it should redirect to https://MySharepoint.Dev.com without default.aspx page.

I have almost around 30 sitecollections like this. Is there any setting where we can just include like that?

6

I would use URL Rewrite module for this with pattern

(?:[^*]+)(?=\/default\.aspx)

In case you wish to get rid of /pages/ as well, use this for pattern

(?:[^*]+)(?=\/pages\/default\.aspx)

and Rewrite URL

{R:0}

It will tackle at least these scenarios

enter image description here

Details on configuring URL Rewrite module can be found here.

  • I tried this but still when i browse ( mysp.com/Pages/default.aspx). it still browse the same default.aspx page – santosh kondapalli Apr 6 '17 at 3:18
  • If you test that URL in "Test pattern..." dialog, does it match your Pattern and return correct redirect URL in the {R:0} variable? – Jussi Palo Apr 6 '17 at 6:29
  • Yes It is Returning up to Pages. But when i browse the url it is not – santosh kondapalli Apr 6 '17 at 10:11
  • Oh, your question didn't have /Pages/ there in the middle. If in browser you type just mysp.com, to what page you end up? – Jussi Palo Apr 6 '17 at 10:59
  • I tried for the site which has mysite.sarepoint.com/default.aspx. It works in the Rewrite Condition but it does not work when i paste the same url in browser – santosh kondapalli Apr 6 '17 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.