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.

We've moved the forum!

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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

temp site home page while testing


Go to End


5 Posts   2632 Views

Avatar
w1

Community Member, 21 Posts

13 February 2009 at 10:26am

Normally when we create a site in ss, we create a temp sub directory to install and create the site, and move it to root when it goes live.

We have a large site (and highly publicised in our region) going live on Sunday, and wish to move the site to root now for final testing, but retain a temp home page (index.html) until we remove it. I cannot figure out what to add to the top of the ss stuff in the .htaccess file to achieve this.

Appreciate some help if anyone has done this successfully

cheers
Peter

Avatar
Willr

Forum Moderator, 5523 Posts

13 February 2009 at 2:08pm

This is the code I use when upgrading a site, you can probably adapt this for you use. Change the 888 to your IP address (this allows you to make changes)

RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_HOST} !^888\.888\.888\.888

RewriteRule $ /maintenance.html [R=302,L] 

Avatar
w1

Community Member, 21 Posts

13 February 2009 at 2:42pm

perfect - thank you Will

can other ip addresses be added too? - if so, what would used

RewriteCond %{REMOTE_HOST} !^888\.888\.888\.888
RewriteCond %{REMOTE_HOST} !^888\.888\.888\.887

?
or something different from that
tks
Peter

Avatar
Willr

Forum Moderator, 5523 Posts

13 February 2009 at 2:48pm

Pretty sure that will work :)

Avatar
w1

Community Member, 21 Posts

13 February 2009 at 2:59pm

tks again

cheers
Peter