I wrote a short article awhile back on how to redirect using .htaccess It's a little more complicated but it will allow you access to your site while others get redirected.
llynix.com/articles/htaccess-under-construction
I wrote a short article awhile back on how to redirect using .htaccess It's a little more complicated but it will allow you access to your site while others get redirected.
llynix.com/articles/htaccess-under-construction
This is what worked for me..............
Merlinpa1969
Black Belt
Merlinpa1969's Avatar
Join Date: Mar 2004
Location: Trapped in this box
Posts: 16,007
Default Re: Anyone know how to make index.html default instead of index.php?
ok not a problem
Put a .htaccess file in your web root directory, if there isn't one yet.
Then add the line:
DirectoryIndex index.html index.htm index.php
or change it accordingly.
That line tells apache what file to look at first when it is not specified in the URL, in the same order that you put it after DirectoryIndex.
In this example it would first look for index.html, load it if found, if not look for index.htm, load it if found, and if not load index.php.
##############################___
Camelot-hosting.com A PCI Compliant E-Commerce Host.
i want to re-direct to main.html till my sites ready.
main.html contains 'under construction' text
My .htaccess contains text below
DirectoryIndex main.html index.htm index.php
This works in that main.html is what is shown.
The problem im having now is even when i type in my index.php URL
i get re-directed to main.htm.
so i cant see my zencart homepage
if i remove .htaccess, then i (and everyone else) sees my unfinished zencart index page
Help please!
Cookie
Is there a reason you don't just rename main.html to index.html, or is your server configuration such that index.html doesn't load first ?
Hi
it was index.html
i just changed it to 'main.html' try to fix the problem.
re:server configuration -yes - index.html doesnt load
if i remove the .htacces
the server goes straight to my zencart index.php
i just need to see this page privately
Thanks
I haven't seen a server set up that way, but the only other thing I can think of would be to password-protect the site, usually doable in your hosting control panel.