New Zenner
- Join Date:
- Jan 2010
- Posts:
- 10
- Plugin Contributions:
- 0
How can I always hide my Zen Cart subfolder address?
I've successfully installed my zencart in a subfolder of my public_html folder. I can access it as http://domain.com/zencart.
I used my .htaccess to forward naked requests to domain.com to domain.com/zencart. However, I'd like to hide the subfolder name from the browser, if possible. Using the .htaccess I hid the subfolder from the first time you access the site, but clicking any site links, (including home), the url gets rewritten as http://domain.com/zencart/
Down below, I've included the contents of my .htaccess file, if anyone can decipher it and respond as to what I should do next. My suspicion is that I need to configure some Zen Cart native variables. (I checked out what's in configure.php, but couldn't get anything to work from there).
Thanks,
Alex (Brand New Zen Cart User)
Relevant information:
Zen Cart version 1.3.8a [patched]
Hosting: JustHost.com
.htaccess
RewriteEngine on
Change yourdomain.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
Change 'subfolder' to be the folder you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/zencart/
Don't change this line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Change 'subfolder' to be the folder you will use for your main domain.
RewriteRule ^(.*)$ /zencart/$1
Change yourdomain.com to be your main domain again.
Change 'subfolder' to be the folder you will use for your main domain
followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$
RewriteRule ^(/)?$ zencart/index.php [L]