|
Step 6 installs a .htaccess file inside your store directory.
The Cartage installer attempts to correct the values in the file to match your server setup, but it sometimes fails to do this. This FAQ explains how the file should look if it is to work correctly.
The 3 lines we are concerned about in the file are:
RewriteCond %{HTTP_HOST} [NC]
RewriteCond %{REQUEST_URI} ()/index.php [NC]
RewriteRule index.php http%{ENV:askapache}://%{HTTP_HOST}/%1/cartage.php [R=301,L]
Your domain name is the first part of your URL, minus the http or https. The request URI is everything after that, before the query string. So, a link such as http://www.connectage.com/store/index.php?main_page=index breaks up into these parts for the htaccess file:
Domain name - www.connectage.com
Request URI - /store/index.php
Query String - main_page=index
The purpose of this htaccess redirect is to direct users who go directly to your store index.php to go to the cartage.php file (which is essential if Cartage is to work). So we have 2 conditions. On your domain, if you are inside the store accessing the index file, lets redirect (with all parameters) to the cartage.php file within Zen Cart™.
So, the .htaccess redirect for a site with a URL as above, will end up:
RewriteCond %{HTTP_HOST} www\.connectage\.com [NC]
RewriteCond %{REQUEST_URI} (store)/index.php [NC]
RewriteRule index.php http%{ENV:askapache}://%{HTTP_HOST}/%1/cartage.php [R=301,L]
Remember that regular expressions require that the period character be escaped inside a strong to check for. We've set the redirect type to be a 301 Permanent Redirect (R=301) so that any links that previously went to your store index.php will be updated over time to the new location or cartage.php
There is a lot more information about .htaccess redirects available on the Internet, along with Regular Expressions. This overview should be enough to explain how this step 6 works.
|