Hi
I'm building a new site and have cmsms installed to the domain root, but whilst building the site I don't want it accessible to the public.
Is there anyway to rename (hiding it) the index.php (to say index-new.php) so any request sent to the site root looking for the index fails? Whilst ensuring the pages of the site reference the new index page
I know I could have instlled to a sub directory but didn't want to have to move it to go live.
I have looked in the config and site admin but can't find anything like this.
Any ideas?
Steve
[solved] any way to hide or rename index.php whilst building a new site
[solved] any way to hide or rename index.php whilst building a new site
Last edited by stevegos on Fri Feb 27, 2009 10:20 am, edited 1 time in total.
Re: any way to hide or rename index.php whilst building a new site
Simplest thing is to upload a holding page as index.html - most servers are configured to look for html pages before php.
Then visitors to the site who just enter www.whaterver.com will get the html page whilst you can continue to develop the site and view it at www.whatever.com/index.php
This is of course dependant on your server setup, but it nearly always works.
If it doesn't work straight off you can probably change things in your server configuration or start rewriting things in .htaccess but give it a go first of all.
s.
Then visitors to the site who just enter www.whaterver.com will get the html page whilst you can continue to develop the site and view it at www.whatever.com/index.php
This is of course dependant on your server setup, but it nearly always works.
If it doesn't work straight off you can probably change things in your server configuration or start rewriting things in .htaccess but give it a go first of all.
s.
Re: any way to hide or rename index.php whilst building a new site
Thanks. Its always the simplest solution that works.
Steve
Steve
Re: [solved] any way to hide or rename index.php whilst building a new site
I'm glad that solution worked for you.
I think best practices would be to use a sub-folder, but in your case that wasn't practical. However, I can assure you it's very easy to move the site down one folder, if you are using a Shell client.
For other people looking for a similiar issue who don't have their server configured to serve index.html first, I'd try the following:
1. Install into sub-directory
2. password protect directory using an htc file or just through your hosts control panel if they offer that
3. give the home page a template that has neither content nor menu structure. This way you can directly browse to the real home page at "yoursite.com/index.php?page=realhomepage" but visitors will go to "yoursite.com/index.php?page=homepage" and just see a blank page or temp page. A simple fake home page template would be, Site coming soonSite Coming Soon
I think best practices would be to use a sub-folder, but in your case that wasn't practical. However, I can assure you it's very easy to move the site down one folder, if you are using a Shell client.
For other people looking for a similiar issue who don't have their server configured to serve index.html first, I'd try the following:
1. Install into sub-directory
2. password protect directory using an htc file or just through your hosts control panel if they offer that
3. give the home page a template that has neither content nor menu structure. This way you can directly browse to the real home page at "yoursite.com/index.php?page=realhomepage" but visitors will go to "yoursite.com/index.php?page=homepage" and just see a blank page or temp page. A simple fake home page template would be, Site coming soonSite Coming Soon