none
How to programmatically update hardcoded URL in page

    Question

  • Hi,

    I have some 25000 static pages in my page library. Some of the pages has hardcoded URLs.

    what should be the approach for:

    1. Determining the pages having particular string sequence in the URL

    2. Updating hardcoded URL to point to some different server

    Thanks,


    Saurabh Agrawal SharePointABC

    Monday, February 27, 2012 12:51 PM

Answers

  • Hi Saurabh,

    I think you can use Url rewrite module for IIS 7 it should able to modify response of your webapplication and replace the urls with new url after response for your sharepoint webapplication is generated. This way you would be able to save lot of time or may be will able to buy more time to figure out some better way such as writing a custom application using Server Side Object model and replace the urls in html content of each page.

    Regards,
    Hiren

    • Proposed as answer by Share Pointer Monday, February 27, 2012 2:23 PM
    • Marked as answer by Shimin Huang Tuesday, March 6, 2012 6:55 AM
    Monday, February 27, 2012 2:23 PM

All replies

  • I can offer to use SharePoint Search & Replace utility


    Senior Software Developer - Virtosoftware - Premium Web Parts for Microsoft SharePoint 2007 & 2010

    Monday, February 27, 2012 1:22 PM
  • Hi Saurabh,

    I think you can use Url rewrite module for IIS 7 it should able to modify response of your webapplication and replace the urls with new url after response for your sharepoint webapplication is generated. This way you would be able to save lot of time or may be will able to buy more time to figure out some better way such as writing a custom application using Server Side Object model and replace the urls in html content of each page.

    Regards,
    Hiren

    • Proposed as answer by Share Pointer Monday, February 27, 2012 2:23 PM
    • Marked as answer by Shimin Huang Tuesday, March 6, 2012 6:55 AM
    Monday, February 27, 2012 2:23 PM