Full service web hosting, great prices and support. Starts at $1.99/month!
Results 1 to 6 of 6

Thread: redirect from root

  1. #1
    rhodesengr
    Guest


    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?

  2. #2
    osCMax Developer


    redirect from root


    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    23,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    michael_s     $ 10.00
    Rep Power
    598


    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

  3. #3
    met00
    Guest


    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>

  4. #4
    rhodesengr
    Guest


    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

  5. #5
    osCMax Developer


    redirect from root


    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    23,134
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site

    Total Contributions For

    michael_s     $ 10.00
    Rep Power
    598


    Default Re: redirect from root

    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:
    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.

  6. #6
    rhodesengr
    Guest


    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

Similar Threads

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

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •