murph Posted May 31, 2004 Share Posted May 31, 2004 How do you make it so that someone can type in your url i.e. www.mydomain.com and it defaults immediately to the oscommerce catalog page without them having to type in www.mydomain.com/catalog ???? i.e. when I just type in my domain name into the address bar I get this: Index of / Name Last modified Size Description -------------------------------------------------------------------------------- Parent Directory 31-May-2004 10:26 - _private/ 26-May-2004 14:48 - catalog/ 31-May-2004 10:25 - cgi-bin/ 26-May-2004 14:48 - images/ 26-May-2004 14:48 - postinfo.html 26-May-2004 14:48 2k But when I type in my domain name like this: www.mydomain/catalog then I get the home page. This is probably a very simple thing and I am a stupid newbie so could anyone help :) Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2004 Share Posted May 31, 2004 why not move the catalog up one level and then change the configure.php files, then it doesnt matter . .. Link to comment Share on other sites More sharing options...
Guest Posted May 31, 2004 Share Posted May 31, 2004 Or, you could create an index.php file in your root directory that includes a redirect: <?php header("Location: http://www.urltoredirecto.com/") ?> where you would replace www.urltoredirecto.com/ with www.yourdomain.com/catalog/ This would then redirect your home page to the catalog directory, which then would serve up the index.php file in that directory. Link to comment Share on other sites More sharing options...
murph Posted May 31, 2004 Author Share Posted May 31, 2004 Hi, could both of you explain that a bit more. i.e. what would I have to change in configure.php if I were to move the catalog folder up one level? Or with the 2nd option, where exactly do I create the index.php file - is it in public?html folder or just by itself in the opening page of the file manager, not in a folder? Also what SORT of file is it - I am given choices ie html, perl script, shell script, text document? Please help! Thanks! Link to comment Share on other sites More sharing options...
pewe Posted May 31, 2004 Share Posted May 31, 2004 Murph, Try this. Create a new text document (in Notepad for example), paste the code below, make the changes mentioned below and save it as 'index.htm'. Upload it to your root web directory to replace your current index.htm (or html) page. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>Redirect to shop</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="refresh" content="1;URL=www.mydomain.com/cart"> </head> <body> </body> </html> Changes: - Change the 'Title' to something you want (its called 'Redirect to shop' in the example). - Change the 'URL' to your current domain and the catalog directory 'currently www.mydomain.com/shop' - Change the 1 in the content directory (just before the URL') to the time you want in seconds as a delay before the visitor is automatically redirected to the shop. - Between the <body> and </body> tags type any message you want the visitor to see when they access your web site using www.mydomain.com. You could also create an normal index page with your company logo etc and add the code <meta http-equiv="refresh" content="1;URL=www.mydomain.com/cart"> in the top of your page. This is simple and effective, and I hope it helps. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.