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   2683 Views

Avatar
Bert

Community Member, 19 Posts

27 June 2008 at 1:17am

Edited: 27/06/2008 1:18am

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

Forum Moderator, 801 Posts

3 July 2008 at 10:57pm

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

Administrator, 685 Posts

7 July 2008 at 1:07pm

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

Avatar
Bert

Community Member, 19 Posts

11 July 2008 at 3:27am

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

Community Member, 78 Posts

11 July 2008 at 3:59am

Edited: 11/07/2008 4:04am

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

Administrator, 685 Posts

14 July 2008 at 5:29pm

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

Community Member, 19 Posts

15 July 2008 at 9:30pm

@ 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

Community Member, 78 Posts

15 July 2008 at 10:07pm

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