Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Static index.html as first page of a SS website

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

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

Page: 1
Go to End
Author Topic: 2645 Views
  • Bert
    Avatar
    Community Member
    19 Posts

    Static index.html as first page of a SS website Link to this post

    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.

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Static index.html as first page of a SS website Link to this post

    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...)

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Static index.html as first page of a SS website Link to this post

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

  • Bert
    Avatar
    Community Member
    19 Posts

    Re: Static index.html as first page of a SS website Link to this post

    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.

  • Pixel
    Avatar
    Community Member
    78 Posts

    Re: Static index.html as first page of a SS website Link to this post

    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

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Static index.html as first page of a SS website Link to this post

    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.

  • Bert
    Avatar
    Community Member
    19 Posts

    Re: Static index.html as first page of a SS website Link to this post

    @ 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?

  • Pixel
    Avatar
    Community Member
    78 Posts

    Re: Static index.html as first page of a SS website Link to this post

    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

    2645 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.