Sharepoint modifies url in aspx and master pages after content database restore
We have restored the content database of our production site onto a test site to have content refreshed. We were surprised to see that many pages were not displaying correctly anymore on our test server. We found out that many links were altered in some ASPX and Master pages. Some urls were missing a trailing "/", some missing a starting "/" which caused resources (css and js files in occurrence) to be loaded from a relative location instead of absolute location. A url that appears like this in production <script type="text/javascript" src="/js/scripts.js?version=1"></script> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script> is replaced like this in our test environment (see missing beginning "/" and whole server name removed in second occurence) <script type="text/javascript" src="js/scripts.js?version=1"></script> <script type="text/javascript" src="/ajax/libs/jquery/1.4.1/jquery.min.js"></script> If I download the page to disk and open it in notepad I do see the page is different!?! If we manually fix the file and upload it back then changes are preserved. We did restore the database with stsadm and SQL Server backup/restore but both method yields the same odd behavior. We also restored the content database on another site on the same physical server as production and we saw again the same odd behavior. Both production and test web.config file are the same except some connection strings and other harmless app settings (I was suspecting a http module of some kind causing this trouble but it does not seem to be the case). Any idea or things to try? Thanks. Pascal
April 11th, 2011 12:42pm

I don't have a solution, but just wanted to say I think we are experiencing the same exact thing. We are on MOSS 2007, but I have noticed this same behavior with our Google Translator widget that uses : <script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> but it changes to <script src="/translate_a/element.js?cb=googleTranslateElementInit"></script> Not sure how to stop this?
Free Windows Admin Tool Kit Click here and download it now
May 9th, 2011 4:33pm

I am glad to see that I am not alone having this issue! I still don't have a resolution to this.
May 9th, 2011 4:38pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics