Results 1 to 9 of 9
  1. #1

    Default URL shows the /ZenCart folder. How to remove?

    My zencart is installed in a folder, instead of the root directory.

    http://www.cheapstairparts.com/ZenCart

    I have a redirect, so if you just type in cheapstairparts.com it will redirect you to the folder... but I don't want the /ZenCart to show up.

    As I understand, you can edit the .htaccess file to fix this, but I have no idea how to do this.

    Can anybody look at this code and help me?

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^cheapstairparts.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.cheapstairparts.com$
    RewriteRule ^/?$ "http\:\/\/www\.cheapstairparts\.com\/ZenCart" [R=301,L]

  2. #2
    Join Date
    Oct 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: URL shows the /ZenCart folder. How to remove?

    Just make that folder the root folder of that website.

    That'll do it.

    What kind of server you using?

  3. #3

    Default Re: URL shows the /ZenCart folder. How to remove?

    I am on shared hosting, because I have other domains, and changing root folders is not allowed.

    My only option is editing this .htaccess file, and it is way above my level.

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: URL shows the /ZenCart folder. How to remove?

    You can't copy the contents of /zencart into the root of that domain and edit the two configure.php files?

  5. #5
    Join Date
    Oct 2007
    Posts
    9
    Plugin Contributions
    0

    Default Re: URL shows the /ZenCart folder. How to remove?

    Maybe change the folder title to '.' or 'store' so its a little more palatable if your hosting package is that limiting.

    Or maybe get a hosting package where you can control this sort of thing ;-)

  6. #6

    Default Re: URL shows the /ZenCart folder. How to remove?

    well I can try to move everything to the root folder and edit the config files, is there anything else I need to change other than config files before I transfer?

  7. #7
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: URL shows the /ZenCart folder. How to remove?

    Nope. That should do it - all you have to change is the paths, so just remove the /zencart from them and you should be good. You'll have to change permissions on the configure files to change them, of course.

    I assume that in your previous post you meant that you couldn't point a domain to a subdirectory of another domain. My host doesn't allow that either on shared servers, and I think it's a good policy.

  8. #8
    Join Date
    Jun 2008
    Location
    Washington, DC
    Posts
    789
    Plugin Contributions
    7

    Default Re: URL shows the /ZenCart folder. How to remove?

    Quote Originally Posted by CheapStairParts View Post
    My zencart is installed in a folder, instead of the root directory.

    http://www.cheapstairparts.com/ZenCart

    I have a redirect, so if you just type in cheapstairparts.com it will redirect you to the folder... but I don't want the /ZenCart to show up.

    As I understand, you can edit the .htaccess file to fix this, but I have no idea how to do this.

    Can anybody look at this code and help me?

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^cheapstairparts.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.cheapstairparts.com$
    RewriteRule ^/?$ "http\:\/\/www\.cheapstairparts\.com\/ZenCart" [R=301,L]
    Try this rewrite mod it works for me.
    Code:
    # ReadWrite Rules SW 05.07.08
    # ZenCart installed in subdirectory but want URL to appear as root
    
    Options -Indexes
    RewriteEngine on
    Options +FollowSymLinks
    RewriteCond %{HTTP_HOST} !^www\.mysite\.com$ [NC]
    RewriteRule .* http://www.mysite.com/ [L,R=301]
    RewriteRule ^$ store/index.php [L]
    RewriteCond %{DOCUMENT_ROOT}/store%{REQUEST_URI} -f
    RewriteRule .* store/$0 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* store/index.php?q=$0 [QSA]
    Of course you would change mysite to your url and store to your subdirectory name

    Next:
    I edited includes/configure.php and changed the following from the install.
    Code::
    Code:
    define('DIR_WS_HTTP_CATALOG', '/store/');
    define('DIR_WS_HTTPS_CATALOG', '/store/');
    To this:
    Code::
    Code:
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_CATALOG', '/');
    As for the admin config I made no changes.

    NOTE: MAKE BACKUPS

    Skip
    • 446F63746F722057686F •

  9. #9

    Default Re: URL shows the /ZenCart folder. How to remove?

    This "did" work but the CSS was not working after I did it.

    I think I will just leave the /ZenCart on the URL, so far it isn't worth the trouble to fix.

 

 

Similar Threads

  1. How do I remove the c-284_81_270.html in the URL for SEO.
    By MagicMan in forum General Questions
    Replies: 1
    Last Post: 2 Feb 2015, 06:56 PM
  2. v150 how to rename the admin folder name of zencart 1.5.0,urgently
    By simonzang in forum Upgrading to 1.5.x
    Replies: 2
    Last Post: 16 Feb 2012, 09:29 AM
  3. Remove folder name from URL?
    By weljkodj in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 14 Jun 2011, 01:18 PM
  4. how do I remove the zencart banner in the top left of the classic template?
    By zc-newbie in forum Templates, Stylesheets, Page Layout
    Replies: 31
    Last Post: 25 May 2010, 03:27 PM
  5. Moved to new webhost, how do i remove the IP from the URL?
    By boinkit in forum Installing on a Linux/Unix Server
    Replies: 6
    Last Post: 26 Feb 2009, 06:19 PM

Posting Permissions

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