rondee1246 Posted December 13, 2002 Share Posted December 13, 2002 Hello, my unix host will not open webpages if they are named default.php or for that matter default.htm. I have to rename to index.php to get them to work. (i.e. /catalog/default.php must be /catalog/index.php) My problem is that all the links in the categories box point to default.php, where do I change this? :? Link to comment Share on other sites More sharing options...
Guest Posted December 13, 2002 Share Posted December 13, 2002 I go about this by creating and index file to redirect to default.php Example: <html> <HEAD> <TITLE>Redirector</TITLE> <META NAME="Author" CONTENT=""> <META NAME="Description" CONTENT=" "> <META HTTP-EQUIV="refresh" CONTENT="1 ;URL=http://www.yousire.com/catalog/default.php"> </HEAD> Link to comment Share on other sites More sharing options...
miyake Posted December 13, 2002 Share Posted December 13, 2002 Or create a .htaccess file and put the following... DirectoryIndex default.php index.php That'll make Apache look for default.php 1st, then index.php Link to comment Share on other sites More sharing options...
TimD Posted December 13, 2002 Share Posted December 13, 2002 try this: i create a file called index.php and slap this code in it <? if ($QUERY_STRING == '') { header ("Location:http://www.leaderfloors.co.uk/catalog/default.php"); exit; } ?> :) hope this helps :) Link to comment Share on other sites More sharing options...
Christian Lescuyer Posted December 13, 2002 Share Posted December 13, 2002 Change line define('FILENAME_DEFAULT', 'default.php'); in application_top.php to: define('FILENAME_DEFAULT', 'index.php'); Christian Lescuyer Link to comment Share on other sites More sharing options...
toolcrazy Posted December 13, 2002 Share Posted December 13, 2002 I advise that you avoid any type of redirect. Christian or miyake idea is the best. Some or most of the search engines do not like redirect and they will not index your site. There is several post on this in these forums. Check it out. Steve ------------------------- Link to comment Share on other sites More sharing options...
Ajeh Posted December 13, 2002 Share Posted December 13, 2002 I have a .htaccess file in my root. Note if using FrontPage this may be a bad idea check with your hosting site to do this for you. 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 Now when you type http://www.yourdomain.com/yourdirectory it will by default hunt down what page to open in the order you have them listed above. Note: I have a missing.html that handles anything anyone tries to do that is bad or sneak into a directory without an index. Link to comment Share on other sites More sharing options...
WebGeek Posted December 13, 2002 Share Posted December 13, 2002 I created an index.php with only the line <?php include('default.php'); ?> in it. Works like a charm but does anyone know of any disadvantages to this approach? I'm considering taking Linda's advice and just adding default.php to my .htaccess file. Problem is, I have Frontpage extensions installed. I've edited my .htaccess before with no problems, and besides, I don't upload any FrontPage pages to my /catalog directory anyway. I haven't lost my mind, I have it backed up on disk, somewhere... Link to comment Share on other sites More sharing options...
Guest Posted December 14, 2002 Share Posted December 14, 2002 OK, I agree redirection is bad. Thanks for the advice. Now just out of curiosity, how do you guys out there redirect pages from the root? Eg. http://www.mysite.com --> http://www.mysite.com/catalog/ My initial idea was to have a splash page with the user clicking on 'ENTER'. This of course applies to those who wants to have the osCommerce page as their main page. Link to comment Share on other sites More sharing options...
fish_head Posted December 14, 2002 Share Posted December 14, 2002 I just did this same thing yesterday. My host uses index.php and not default.php. I did it the way Christian Lescuyer suggested. I renamed my defalut.php pages to index.php and then in application_top.php, changed: define('FILENAME_DEFAULT', 'default.php'); to define('FILENAME_DEFAULT', 'index.php'); Works like a charm. :D Link to comment Share on other sites More sharing options...
WebGeek Posted December 14, 2002 Share Posted December 14, 2002 I renamed my defalut.php pages to index.php and then in application_top.php, changed: define('FILENAME_DEFAULT', 'default.php'); to define('FILENAME_DEFAULT', 'index.php'); Works like a charm. :D That's the ticket! :P I haven't lost my mind, I have it backed up on disk, somewhere... Link to comment Share on other sites More sharing options...
Christian Lescuyer Posted December 14, 2002 Share Posted December 14, 2002 OK, I agree redirection is bad. Just in this case. It's a useful possibility. Now just out of curiosity, how do you guys out there redirect pages from the root? .htaccess: RewriteEngine on RewriteRule ^$ /catalog/ [R] Christian Lescuyer Link to comment Share on other sites More sharing options...
Guest Posted December 14, 2002 Share Posted December 14, 2002 Good on you Christian. Works like a charm. Many thanks. Link to comment Share on other sites More sharing options...
sw45859 Posted December 14, 2002 Share Posted December 14, 2002 wasn't there a contribution to allow you to choose the main file in the admin section? Link to comment Share on other sites More sharing options...
toolcrazy Posted December 14, 2002 Share Posted December 14, 2002 I used Linda's method and it works perfect. I had troubles with the the application_top.php editing method and my server. @#$% safe mode problems. And MS Front Page 98 works too. Thanks Linda. Steve Steve ------------------------- Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.