Jump to:

23576 Posts in 19403 Topics by 2893 members

General Questions

SilverStripe Forums » General Questions » Underconstruction Mode

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: 1545 Views
  • Beck
    Avatar
    Community Member
    23 Posts

    Underconstruction Mode Link to this post

    Hi everyone! i want to make website not to publish. i mean: design, content, etc... like Underconstruction Mode. how can i do this?
    i've changed .htaccess but couldn't get what i want. does anybody have any idea?

    Thanks in advance

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Underconstruction Mode Link to this post

    Well, you could simply comment out or remove the .htaccess file and put up a index.html file which the webserver would display.
    You should be aware, that this procedure will also remove the possibility to access the CMS itself though.

  • AdamJ
    Avatar
    Community Member
    145 Posts

    Re: Underconstruction Mode Link to this post

    If I remember correctly, you can target htaccess rules at ips. Maybe you could say that any ip except yours will see the construction page, where you will see the site as normal.

  • Beck
    Avatar
    Community Member
    23 Posts

    Re: Underconstruction Mode Link to this post

    htaccess rules at ips like this?

    order allow deny
    deny from all
    allow from <your ip>

  • Beck
    Avatar
    Community Member
    23 Posts

    Re: Underconstruction Mode Link to this post

    i talk to darkmonkey in SS's chat:
    why not put it in the non-base folder
    save yourself from messing around with htaccess
    ./index.html <- under construction page
    ./new/

    He means:
    www.domain.com/index.html <--under construction page
    www.domain.com/new/ <-- SilverStripe

    when it's ready to publish, just change directory to www.domain.com, then ofcourse www.domain.com/dev/build?flush=1

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Underconstruction Mode Link to this post

    Yes, that would be a solution.

    The IP based approach would work too. Add something along these lines to your .htaccess.

    RewriteBase /

    RewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)|(\.php$)
    RewriteCond %{REMOTE_ADDR} !^127.0.0.1
    RewriteRule .* index.html [L,NC]

    You would have to replace the IP (red) with a valid address. All IP addresses other than the provided one will be redirected to index.html. This way you can still access the CMS and your Site, while all others just see the index.html page.

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