Host Standard Websites on Office 365 Sharepoint
There have been a lot of unhappy website owners over on the Office 365 Forums who have transitioned from OLSB to Office 365. They seem to have encountered a lot of issues, especially with URLs and Google Rankings being affected by Sharepoints use of a /Pages/ folder for all content.
Now Office 365 was never designed to be used as a web hosting platform and I am not sure why these people are migrating to it, but it got me wondering if it was possible to hack up Office 365 to host a plain old static website. It turns out it can be done so I thought I’d write up a blog post sharing my research. This would solve a lot of the problems people are having with the OLSB to Office 365 migration as it will allow them to continue using their old navigation and folder structure as well as add things like Favicon’s and Google Analytics, but the potential to break lots of things is enormous.
Let me start by saying one thing:
I DO NOT RECOMMEND ANYONE DOES THIS FOR THEIR PRODUCTION WEBSITE
If you are having problems with the transfer I suggest you talk to Ken over at http://www.builditon365.com/Pages/default.aspx. He is doing a great job helping and educating other OLSB refugees. This post is merely a proof of concept and would most likely be frowned upon by Microsoft.
I started off by connecting to my Office 365 Sharepoint site through Windows Explorer. I followed these Microsoft instructions to get me up and running:
Once I had my explorer window opened, I navigated to my WWWRoot folder in Explorer by going to \\burnsies.sharepoint.com\DavWWWRoot
In here I could see all my Sharepoint files, including default.aspx. I took a backup copy of all the files and stored them somewhere safe.
I then needed a website to put up so I dug out the Hubble theme I purchased for another project a while ago and copied the entire folder structure up to my DavWWWRoot folder – .htm/css/js files – everything.
Unfortunately, when I opened up http://burnsies.sharepoint.com/index.htm in my browser it tried to download the .htm file. It appears that IIS is configured to only serve .aspx files.
The work around for this is quite easy. I used a simple DOS command to rename all the .htm files to .aspx
ren *.htm *.aspx
This would have meant all the hyperlinks in my website would now have failed, so I opened all the newly renamed .aspx files in Notepad++ and did a find/replace of .htm with .aspx across all open files.
Finally, I copied the edited files and complete folder structure back into my DavWWWRoot folder on Sharepoint which now looks like this. You can see the files I added are highlighted in grey.
To check out the website in action go to http://burnsies.sharepoint.com