warrenthewindmill Posted April 7, 2003 Share Posted April 7, 2003 I've tried setting up a .htaccess in the root directory and it is ignored. My Host looks for: default.html default.htm index.html index.htm index.shtml index.php index.php4 index.php3 index.phtml in that order. I have searched their knowledge base and found a reference to .htaccess files. It says, "By default Apache does not look for .htaccess files, so if a user manually creates one in a directory it will be ignored" Why shouldn't I just change the name of my default.php file to index.php. I guess that means I have to search for everywhere in the site default.php is referenced. I am using a big British outfit to host my site, "it's been named among the top ten fastest-growing technology companies in Europe" they say so I can't be the only one with this problem. What does everyone else do? Link to comment Share on other sites More sharing options...
Q Posted April 7, 2003 Share Posted April 7, 2003 Is it a linux or window server? Link to comment Share on other sites More sharing options...
Q Posted April 7, 2003 Share Posted April 7, 2003 look in your httpd.conf file for the apache server and search for the following: # AccessFileName: The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # <Files ~ "^.ht"> Order allow,deny Deny from all </Files> For IIS servers, .htaccess does not work. You will have to do it differently. Link to comment Share on other sites More sharing options...
warrenthewindmill Posted April 7, 2003 Author Share Posted April 7, 2003 Linux Link to comment Share on other sites More sharing options...
Guest Posted April 7, 2003 Share Posted April 7, 2003 Rename catalog/default.php to index.php Rename catalog/includes/languages/english/default.php to index.php In catalog/includes/application_top.php, change: define('FILENAME_DEFAULT', 'default.php'); to: define('FILENAME_DEFAULT', 'index.php'); Link to comment Share on other sites More sharing options...
Q Posted April 7, 2003 Share Posted April 7, 2003 add the following to your httpd.conf file for the catalog directory. DirectoryIndex default.php you can make it index.php for the admin directory. Link to comment Share on other sites More sharing options...
warrenthewindmill Posted April 7, 2003 Author Share Posted April 7, 2003 so is there any reason why I shouldn't change both amin and catalog files to index.php? Link to comment Share on other sites More sharing options...
Guest Posted April 7, 2003 Share Posted April 7, 2003 admin already has an index.php .... there is no problem with you making the change in the catalog.... it is often easier than getting a host to change the Apache httpd.conf Link to comment Share on other sites More sharing options...
warrenthewindmill Posted April 7, 2003 Author Share Posted April 7, 2003 Thanks. I thought that was the simplest solution, as long as it didn't cause other problems. I'm one step closer... Link to comment Share on other sites More sharing options...
ixbiosxi Posted April 7, 2003 Share Posted April 7, 2003 or just create a new php file and reroute it to index.html, <?php header("location:http://www.yourdomain.com/pathtocatalog/default.php"); ?> For an osCommerce and STS Tutorial click the www button in my profile. Link to comment Share on other sites More sharing options...
ixbiosxi Posted April 7, 2003 Share Posted April 7, 2003 i tried to edit that last post but no go, just name that file index.php.. For an osCommerce and STS Tutorial click the www button in my profile. Link to comment Share on other sites More sharing options...
Guest Posted April 7, 2003 Share Posted April 7, 2003 or just create a new php file and reroute it to index.html, <?php header("location:http://www.yourdomain.com/pathtocatalog/default.php"); ?> This is not a good option as far as search engines go... Link to comment Share on other sites More sharing options...
Ajeh Posted April 7, 2003 Share Posted April 7, 2003 If you create an .htaccess file in your root directory, you can tell it the files to look for. Be sure to check if you already have one. NOTE: Some FTP programs will not show this file so if you have Cpanel or something similar to view your site, check with that first. Create the .htaccess file in a text editor: DiRectoryindex index.shtml index.html index.htm index.php default.php /missing.html AddHandler server-parsed .shtml AddHandler server-parsed .html AddHandler server-parsed .htm This one also has missing.html for when people go where they should not. Just create that as a regular HTML file with some links to get them back to an appropriate location. Link to comment Share on other sites More sharing options...
burt Posted April 7, 2003 Share Posted April 7, 2003 If you create an .htaccess file in your root directory, you can tell it the files to look for. Note, this will only work if the Server Admin has configured the server to accept user .htaccess Why not simply rename the 2 files and make the change in application_top. It's 5 minutes work for even the greenest person. Link to comment Share on other sites More sharing options...
Guest Posted April 8, 2003 Share Posted April 8, 2003 If you create an .htaccess file in your root directory, you can tell it the files to look for. Note, this will only work if the Server Admin has configured the server to accept user .htaccess Why not simply rename the 2 files and make the change in application_top. It's 5 minutes work for even the greenest person. Simplicity is a wonderful thing... :wink: Link to comment Share on other sites More sharing options...
warrenthewindmill Posted April 8, 2003 Author Share Posted April 8, 2003 Thanks for all the responses...I think I like simple although I will check out with my ISP if I can set up a .htaccess file. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.