Hello,
Is there a file name that the servers are set to look for before index.html/htm? I would like to put up a holding page to temporarily make the main site not so obvious while I tinker with it.
Thanks- Sacha
Hello,
Is there a file name that the servers are set to look for before index.html/htm? I would like to put up a holding page to temporarily make the main site not so obvious while I tinker with it.
Thanks- Sacha
Only a staff member could tell you the actual order of preference that apache is set to check for index files on your server, but .html is usually the one that overides everything else. For example index.html will overide index.shtml and index.php
This means your best plan is to add a .htaccess pointer to the index you want to show, so that to see the real index (which you might want to do in testing) you would have to go direct to the index.html page. Anyone going to just the URL with no page specified would see the page you specified in the .htaccess.
The following code in a .htaccess file in the public_html directory will make the page they see on visiting your URL "holding.html". When you want to go back to normal, just delete the line in .htaccess
Hope this helpsCode:DirectoryIndex holding.html![]()
Thanks very much, that solves it for me!
Is it kosher to use this same method for a re-direct to an outside url? I've tried it and it seems to function, just want to know if it is okay to do it this way.
Thank you!
It depends what code you want to send to the browser or search engine that is accessing the URL. If you actually want to redirect to another url it is best to use temporary or permanent redirects which cause codes to be sent to the browser to indicate that a redirect has actually occured. You can activate such redirects in cpanel.
thank you very much!
There are currently 1 users browsing this thread. (0 members and 1 guests)