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.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Static index.html as first page of a SS website


Reply

8 Posts   2658 Views

Avatar
Bert

27 June 2008 at 1:17am (Last edited: 27 June 2008 1:18am), Community Member, 19 Posts

Is it possible to have a static index.html page as the first page of a SilverStripe website? So that when you go to http://localhost/mysilverstripesite/, you are first shown the index.html page, and on that page there is a link to /home, which is the actual SS homepage.

Avatar
Ingo

3 July 2008 at 10:57pm Forum Moderator, 801 Posts

hm, whats the reasoning behind this?

you could either have a custom .htaccess mod_rewrite rule, or see if you can set up a RedirectorPage with the URLSegment "home" (although it would be kinda nuts to redirect from Silverstripe to a static page, just to link back to Silverstripe pages...)

Avatar
Sam

7 July 2008 at 1:07pm Administrator, 685 Posts

Like Ingo said, putting a custom handler in your .htaces would be the best bet.

Avatar
Bert

11 July 2008 at 3:27am Community Member, 19 Posts

The first page of the website I'm currently developing is a teaser page, which contains an animated banner and a link to the first SilverStripe page (/home) of the website. The teaser page has an entirely different layout than the website itself, and contains no dynamic content whatsoever.

So what I basically have in mind is that when the visitor types www.example.com, he or she is first shown the static teaser page, and can click on a "Welcome" link which goes to /home.

Avatar
Pixel

11 July 2008 at 3:59am (Last edited: 11 July 2008 4:04am), Community Member, 78 Posts

Can you not just make a different template for the teaser page?

May I also recommend not having a splash/teaser page at all as this will have very little content and would (i assume) be flash - not ideal for SEO

Avatar
Sam

14 July 2008 at 5:29pm Administrator, 685 Posts

Create a new page class, SplashPage

then create templates/SplashPage.ss. This template will be used for the whole splash page - it can be completely different.

Avatar
Bert

15 July 2008 at 9:30pm Community Member, 19 Posts

@ Sam:
But that would imply that the URL of the teaser page should be "/home", and the URL of the actual homepage should be something like "/home2", correct?

Avatar
Pixel

15 July 2008 at 10:07pm Community Member, 78 Posts

That is correct but the /home doesn't show - it would just be www.yoursite.com/

So you could then make the actual home page something like /homepage or /sitehome or /main