
Originally Posted by
CheapStairParts
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