sLaV- Posted May 14, 2008 Posted May 14, 2008 Hi, We are trying to change the index.php page as we want a welcome page to be displayed when someone accesses our URL instead of the new products it currently displays on index.php. Is there a way to change the current index.php page to something like default.php and create a new index.php page where we can add a welcome page to (but on this new index.php page we want to display our categories menu also) ... hope that made sense. Cheers.
sLaV- Posted May 15, 2008 Author Posted May 15, 2008 Hmmm was hoping someone might have an answer to this...is it possible to just rename the current index.php file to say default.php then create a new index.php file to have our welcome page one ... will that stuff up anything?? I'm using an older version of osCommerce by the way...
Guest Posted May 15, 2008 Posted May 15, 2008 I'm a little new to this but i think that when you initially upload to install the oscommerce package you have the option to either install the complete package so that the file structure is: http://www.yourdomain.com/catalog/index.php or /catalog/index.php Alternatively you can upload the contents of the catalog folder and the files will look like this: http://www.yourdomain.com/index.php or /index.php If you chose the first option you can put a index.html page first (http://www.yourdomain.com/index.html)with a link to the catalog folder. This keeps the index.html page separate from the .php files Please check with one of the tech guys round here first to make sure. I think that renaming the index.php file will not work...
sLaV- Posted May 15, 2008 Author Posted May 15, 2008 I'm a little new to this but i think that when you initially upload to install the oscommerce package you have the option to either install the complete package so that the file structure is: http://www.yourdomain.com/catalog/index.php or /catalog/index.php Alternatively you can upload the contents of the catalog folder and the files will look like this: http://www.yourdomain.com/index.php or /index.php If you chose the first option you can put a index.html page first (http://www.yourdomain.com/index.html)with a link to the catalog folder. This keeps the index.html page separate from the .php files Please check with one of the tech guys round here first to make sure. I think that renaming the index.php file will not work... Hey mate thanks for the reply...the only problem with adding it as an index.html file is that I want to add PHP code in this welcome page (as I want to have our categories menu still showing on this welcome page) ... so if I name it index.html I cannot have any PHP code :( I just tried renaming the index.php file to default.php and it did not work as expected :(
Guest Posted May 15, 2008 Posted May 15, 2008 Okay, well thats fine just do the same with a .php file that links to the catalog folder
sLaV- Posted May 15, 2008 Author Posted May 15, 2008 Okay, well thats fine just do the same with a .php file that links to the catalog folder I originally tried having my shop in a seperate /catalog/ folder...but then when I went to make an index.php file in the root directory I couldnt access anything that was in the /catalog/ folder because if I tried to include the application_top.php file or the header.php in my index.php file it would give all sorts of errors as my index.php file was NOT in the /catalog/ directory.... So now I have installed osCommerce in the root directory and am now trying to add an index.php file but one already exists since osCommerce in the root directory... Cheers, Slav
Guest Posted May 16, 2008 Posted May 16, 2008 I originally tried having my shop in a seperate /catalog/ folder...but then when I went to make an index.php file in the root directory I couldnt access anything that was in the /catalog/ folder because if I tried to include the application_top.php file or the header.php in my index.php file it would give all sorts of errors as my index.php file was NOT in the /catalog/ directory....So now I have installed osCommerce in the root directory and am now trying to add an index.php file but one already exists since osCommerce in the root directory... Cheers, Slav Slav, Part of what you wish to do is also dependent on the server or host. For example. If I use "index.html" and "index.php" in the root directory, the first one to load will be the index.html.... there is a heirarchy of "home" pages that some hosts require. My entire catalog is in my root (public_html) folder. If it was me, I would use an html as my welcome page and then link, or redirect, to the index.php. But there are probably people on here that will have a better way of doing it.
sLaV- Posted May 16, 2008 Author Posted May 16, 2008 Slav,Part of what you wish to do is also dependent on the server or host. For example. If I use "index.html" and "index.php" in the root directory, the first one to load will be the index.html.... there is a heirarchy of "home" pages that some hosts require. My entire catalog is in my root (public_html) folder. If it was me, I would use an html as my welcome page and then link, or redirect, to the index.php. But there are probably people on here that will have a better way of doing it. Hey mate, Ye I was thinking of adding an index.html page and add a meta-refresh tag in there to redirect it to my homepage that I want...but I was reading through the forums and found somewhere that meta-refresh's are looked down upon by Google...and we want to score highly in Google ranks .. hmmm such a headache :( Cheers, Slav
netgroupone Posted May 16, 2008 Posted May 16, 2008 Hey mate, Ye I was thinking of adding an index.html page and add a meta-refresh tag in there to redirect it to my homepage that I want...but I was reading through the forums and found somewhere that meta-refresh's are looked down upon by Google...and we want to score highly in Google ranks .. hmmm such a headache :( Cheers, Slav Rename the oscommerce file index.php to somthing like store.php and now you can create your own index.php, duh.
Guest Posted May 16, 2008 Posted May 16, 2008 Hey mate, Ye I was thinking of adding an index.html page and add a meta-refresh tag in there to redirect it to my homepage that I want...but I was reading through the forums and found somewhere that meta-refresh's are looked down upon by Google...and we want to score highly in Google ranks .. hmmm such a headache :( Cheers, Slav He's right... rename your index.php and then make your own index.php. I knew someone would have a better way and easier. Back to your meta-refresh.....Google frown's on it when the redirect goes from one site to another. But when it is within the same directory, Google isn't likely to penalize you....according to tech support at my host.. Good luck.
Guest Posted May 16, 2008 Posted May 16, 2008 Yes changing the index.php to store.php does work, my bad/// Arnt .html pages more viral on the net though //?
netgroupone Posted May 18, 2008 Posted May 18, 2008 Yes changing the index.php to store.php does work, my bad/// Arnt .html pages more viral on the net though //? Just use a url rewriting if you are concerned about it. but I don't think that html pages will deliver more taffic then php pages. the url rewriting code you want to use on your htaccess file should be somting like (or exactly like) this: RewriteRule ^index.html$ /index.php
Recommended Posts
Archived
This topic is now archived and is closed to further replies.