Jump to:

22972 Posts in 11596 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » temporary index page

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 2404 Views
  • servalman
    Avatar
    Community Member
    211 Posts

    temporary index page Link to this post

    Hi

    I'm starting with silvertstripe and I wanted to know How do I do to have a simple temporary index page (no menus just a picture)while I devellop the real site

    Thank You

    Thomas

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: temporary index page Link to this post

    I use this script in the .htaccess file to redirect all requests while i upgrade a site

    RewriteCond %{REQUEST_URI} !/maintenance.html$ <!--- LINK TO YOUR TEMP PAGE FILE
    RewriteCond %{REMOTE_HOST} !^212\.123\.239\.177 <!--- YOUR IP.
    RewriteRule $ /maintenance.html [R=302,L]

  • Jay-Dee
    Avatar
    Community Member
    11 Posts

    Re: temporary index page Link to this post

    Hello Will, I have used your method and it works fine.
    The only problem now is that my "coming soon" page has an image and a flash element, and for some reason they will not show up.
    Do you know why this is happening?
    Thank you
    Jay

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: temporary index page Link to this post

    Jay-Dee - this is probably because that rewrite rule says Redirect ALL traffic to the html temp page. Including requests to load css/images. You might need to add another condition to that list which excludes those file types -

    RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)

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