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
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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
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.
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.
htaccess rules at ips like this?
order allow deny
deny from all
allow from <your ip>
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
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.