TDAVIDS
SCRIPT SITES
TD Scripts
php-scripts
Script School |
2002-02-12 19:40:42 showing index.phtml as default in directory using htaccess from www.adultnetsurprise.com
"Remember, when you FTP an htaccess to your home www directory then it will affect all subdirectories in that domain unless another htaccess is in the directory (and takes precedence)" You can use htaccess to make sure that index.phtml or index.php shows in place of index.html inside a directory structure but you will probably need to use .htaccess to do it unless you have the power to change at the server level (root access).
The order of the file works like this:
highest priority <--- lesser priority <-- even less priority <--- and so on priority
So if you wanted index.html to take precedence in the file over index.phtml you would list like this separated by space and all on one line in your .htaccess file:
DirectoryIndex index.html index.phtml
You can have as many different extensions in there as you want, but don't go too crazy.
In the code box below is one that I will sometimes use which covers the common bases. Save this file as .htaccess and FTP to the directory in question in ASCII mode. Remember, when you FTP an htaccess to your home www directory then it will affect all subdirectories in that domain unless another htaccess is in the directory (and takes precedence).
Cut and paste code instructions 1. Right click with mouse 2. Choose SELECT ALL 3. Press CTRL+c to copy 4. Press CTRL+v to paste to your html/text editor
Also, remember if you have multiple index files it will use the file with the *highest priority*
Categories:
Auctions(2) Billing / E-Commerce(3) Blogs(1) Business, general(11) Content Buying/Producing(2) Domains(1) Family, general(5) Gaming(1) Graphic / Design Tip(4) Hosting(1) htaccess(1) Humor(6) Legal(7) Marketing, Promotion(4) Movie_Reviews(1) Newbies(7) PHP(2) Politics(3) Programming, general(5) Satire(2) Search Engines(2) Spam(15) VB(1) Webmastering, general(16) Windows Tips(4) |