PDA

View Full Version : htaccess question


cme4pt
1-19-03, 10:44 AM
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!

PatMan
1-19-03, 11:46 AM
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

cme4pt
1-19-03, 11:53 AM
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