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.

Installing SilverStripe /

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

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

temp site home page while testing


Reply


5 Posts   1851 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, 5513 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, 5513 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