Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Migrating a Site to Silverstripe /

What you need to know when migrating your existing site to SilverStripe.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Making old static site cohabiting with SS

Go to End

3 Posts   2420 Views


Community Member, 34 Posts

27 May 2009 at 5:16am

Edited: 27/05/2009 5:18am


I want to include an old static site in a new SS site temporary, during the construction phase of the new SS site. What I want to do is something similar to that :

put the old site structure into a directory inside SS, something similar to 'old_site'. When receiving a request, SS checks if it's a SS url. If it's a SS url (ex:, then it serves that URL. If the URL doesn't exists, then it checks in the old_site directory to find its equivalent. If it doesn't find it, then the 404 error page comes up.

For example, if, in the old site, a had a link to, i would put everything in /old_site/event123/, so it would stay available.

Of course, i'd need to redirect / to /old_site/index.html the time the site is beeing constructed.

Is this possible?

Thanks in advance,



Community Member, 11 Posts

10 June 2009 at 11:36pm

Use the same strategy as SilverStripe Static Publisher functionality. Solve it with Apaches mod_rewrite. Modify the .htaccess file (or the vhost if you prefer) to check for your static html files (this works if you have the complete site as static html). Check the apache mod_rewrite documentation to fit it to your needs (

# Static content
RewriteCond %{REQUEST_URI} /(.*)$
RewriteCond %{DOCUMENT_ROOT}/old_site/%1.html -f
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* /old_site/%1.html [L]


Community Member, 34 Posts

11 June 2009 at 3:17am

Thank you!