View Full Version : htaccess question
I need to modify a htaccess file so that accessing a particular directory produces the default file instead of the directory listing.
for example /myfolder/default.php
A little help?
cme4pt
WnJBirds
1-19-03, 11:10 AM
Redirect /myfolder/index.htm
http://www.your_site.com/myfolder/default.php
edit the paths, create a BLANK index.htm and place in directory /myfolder/
upload in ASCII confirm DOT htaccess and presto!
You don't really need to use .htaccess to accomplish this - just make sure you name your default document either index.html or index.php. That's much less work for the server than having it read your .htaccess each time a file in that directory is accessed.
Unless, of course, you really need for your default document to be named 'default.htm". ;)
HTH,
Patrick
Unfortunately the file is part of a shopping cart package and it is named default.php. Would have been easier otherwise.
Thanks for the assist!
cme4pt
electron
1-26-04, 12:16 PM
Originally posted by PatMan
You don't really need to use .htaccess to accomplish this - just make sure you name your default document either index.html or index.php. That's much less work for the server than having it read your .htaccess each time a file in that directory is accessed.
Unless, of course, you really need for your default document to be named 'default.htm". ;)
HTH,
Patrick
Does this work for these file types as well?
Saiyaman
1-26-04, 05:54 PM
you could make an index.php and put this in it.
<?php
include "directory/default.php";
?>
i think that should work, i dont know much php, but, i think it will work
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.