Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm currently working on moving our current website from Dreamweaver to SharePoint, and I have a requirement to have an .htm file at the root of my SP2010 site. The reason is that we have software that expects a specific URL, which looks like this:

http://www.mysite.com/productupdates.htm?version=xxxx&blah=xxxx&whatever=xxxx

I tried adding the .htm file to the C:\inetpub\wwwroot\wss\VirtualDirectories\80 folder, but going to that .htm page gives me a 404 error.

What options do I have here, assuming that changing our software is NOT an option?

Is there any configuration within IIS I can do to allow this .htm file to work? Or perhaps within SharePoint 2010 itself?

Thanks

share|improve this question

3 Answers 3

up vote 2 down vote accepted

If the file isn't expecting to be in a document library, you can use SharePoint Designer to upload the file to the root of the web site, and also set this page to be the HomePage for the site within SharePoint Designer.

SharePoint Designer is a free product available from Microsoft, here: http://www.microsoft.com/download/en/details.aspx?id=16573

share|improve this answer
    
^^ SharePoint Designer is the easiest way to upload an HTML document to the root of your site application. –  John Chapman Oct 6 '11 at 16:50
    
It's elegant in its simplicity! Uploading the page via Designer did the trick, and adding querystring parameters to the URL of this page, and executing JavaScript within this .htm file are still possible. Perfect! Thank you, James. –  QMKevin Oct 6 '11 at 18:52

You should be able to provision html at the root of the site by a FEATURE that uses Module element.

From VS.NET add project item of type Module, replace sample.txt with your html file and make sure the elements.xml looks like below assuming you have sample.htm file abd your module name is RootModule. The name of module and html file can be different in your case.

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Module Name="RootModule">
  <File Path="RootModule\Sample.html" Url="Sample.html" />
</Module>
</Elements>
share|improve this answer
    
I'm sure this would work, but James had a much easier solution to the exact problem I was facing. Thanks for the idea though. –  QMKevin Oct 6 '11 at 18:53

If you are running a 2010 Enterprise, you can enable the publishing infrastructure and features. This will give you a link in Site Settings called Welcome Page. This will allow you to set a different home page. So you can upload your htm page to a document library and then set that as the new home page.

share|improve this answer
    
Thank you too, Eric, for the idea, though this one was certainly more than I think I needed. –  QMKevin Oct 6 '11 at 18:54
    
No worries, while mine is a valid option, it isn't the answer in this case. As always with SharePoint, there's more than one way to skin a cat. –  PirateEric Oct 6 '11 at 20:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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