osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

redirect from root

This is a discussion on redirect from root within the osCMax v2 Installation issues forums, part of the osCMax v2.0 Forums category; I want to access my store from www.essential-stuff-store.com rather than www.essential-stuff-store.com/cat alog. I found an older post about this that ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Installation issues

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 08-25-2007, 11:34 AM
New Member
 
Join Date: Aug 2007
Location: NorCal
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
rhodesengr is on a distinguished road
Default redirect from root

I want to access my store from www.essential-stuff-store.com rather than www.essential-stuff-store.com/catalog. I found an older post about this that says to make an index.html file in the root with the following

<SCRIPT>
location="http://www.essential-stuff-store.com/catalog"
</SCRIPT>

Note that is my actual site.
I tried this and it does not work. What did I do wrong?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
  #2  
Old 08-25-2007, 11:59 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,985
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: redirect from root

Nah, the best way is to add this to the .htaccess file in your public_html or htdocs directory:
Code:
DirectoryIndex catalog/index.php index.php
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 08-25-2007, 01:00 PM
Active Member
 
Join Date: Oct 2005
Location: wherever I happen to be at the moment
Posts: 468
Thanks: 4
Thanked 79 Times in 73 Posts
Rep Power: 8
met00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nicemet00 is just really nice
Default Re: redirect from root

Michael,

In the next version of osCMax would it be possible to modify the install procedure to ask, "Do you want the store installed at the root directory or as /catalog?" and then install in the right place? This would get rid of this whole silly forever asked question.

I don't know about you, but I know that this FAQ can easily be avoided by making this simple change. In addition, we can allow someone to change the subdirectory from /catalog to anything they may want to call it.

<hr>
<form>
Install in: <input type=radio value=1 name=insrt>root <input type=radio value=0 name=insrt>Subdirectory
<br>
Subdirectory?: <input type=text name=isubdir value="/catalog">
</form>
<hr>
__________________
so endith the lesson
<think>sometimes I just sit's and thinks</think>
"Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 08-25-2007, 01:40 PM
New Member
 
Join Date: Aug 2007
Location: NorCal
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
rhodesengr is on a distinguished road
Default Re: redirect from root

Michael,

I put a file .htaccess in the directory above /catalog with the code you supplied. It did not work. I got a error about forbidden access. I looked at the oscommerce installation I have to see how they did it. They have an index.php file in the dir above /catalog with the following code

<?php header('Location:catalog/'); ?>

This appraoch works. I would like to understand your approach also.

Perhaps there is a problem because my domain www.essential-stuff-store.com is a sub domain so I can have multiple web sites with one hosting account. My directory structure looks like this

/essentialstuffstore/

/essentialstuffstore/catalog

essentialstuffstore is the root or server location for www.essential-stuff-store.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 08-25-2007, 03:01 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,985
Thanks: 80
Thanked 345 Times in 324 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: redirect from root

Quote:
In the next version of osCMax would it be possible to modify the install procedure to ask, "Do you want the store installed at the root directory or as /catalog?"
I don't think this would be possible without a major rewrite of the installer, since the installer does not upload the php files to the server and is dependent upon where you upload the files in the first place. If you upload the files to /catalog there is no way for the installer to then move them to the site root. We will be updating the installer to match the core osCommerce RC1 install process though (although I am not too familiar with it right now).

This one has always puzzled me. I am not even sure why anyone ever asks the question in the first place, since you can install osCMax in whatever directory you want, and it is fully in the users control to upload the files to wherever they want on their server.

It just seems logical to me that if I want osCMax in the site root, instead of uploading the files to a /catalog subdirectory, I would upload them to the darned site root. At some point we have to expect that the person installing does have to engage their brain and actually think about what they are doing. It doesn't get any more obvious than that. But hey, I am also a genius, so things like that are obvious to me...


Maybe adding some text to the installer step 1:
Hey osCMax user! Did you think about where you want to install your osCMax shop? Do you want it in the site root? If so, did you upload your files to the site root?

One surefire way of idiot proofing anything is to make it too complicated for idiots to use (send your hate mail to blackhole@oscmax.com)*

*Disclaimer: For anyone reading this who lacks sense of humor, the previous statement is what we like to call a 'joke' and is to be taken as humorous.


Now back to the original topic of this thread:
Quote:
I put a file .htaccess in the directory above /catalog with the code you supplied. It did not work. I got a error about forbidden access.
If you are getting a forbidden error, either your path is incorrect or your host does not allow DirectoryIndex overrides through .htaccess. You should check your error logs for the path of the 404 error and adjust your .htaccess file accordingly. Most likely, you would have to make the path /subdomaindir/catalog/index.php.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates designed for osCMax 2. Loyalty discounts up to 30% off!
    Each purchase supports the osCMax project with much needed funds!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host. Default multi server configuration for exceptional performance!

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to michael_s For This Useful Post:
primetime (05-26-2008)
  #6  
Old 08-25-2007, 03:09 PM
New Member
 
Join Date: Aug 2007
Location: NorCal
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
rhodesengr is on a distinguished road
Default Re: redirect from root

I tried adding the subdirectory and it did not work. I'll just use the index.php file. Thanks for trying. Now I am having some operational issues which I will search for or post as a new topic.

Mark
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Advertisement
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Root install /index.php fix michael_s New osCommerce Contributions 0 01-25-2007 07:11 AM
change my mind to root installation ? qantas_new osCMax v2 Installation issues 2 10-07-2006 07:46 PM
SSL and nonSSL running different root folders zinc osCMax v1.7 Installation 4 05-23-2005 07:02 AM
Are there any security issues running in root? DMG osCMax v1.7 Discussion 2 01-25-2004 05:23 AM
root access litotes osCommerce 2.2 Modification Help 1 10-20-2003 03:51 PM


All times are GMT -8. The time now is 11:42 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax