Search Engine Friendly Urls & Mod_Rewrite

Maian Cart supports search engine friendly urls via mod_rewrite. For this to function correctly, your server MUST support .htaccess and mod_rewrite. So, a Linux server is required. This does NOT work on a windows server.

To enable search engine friendly urls, enable the option in your settings: System > General Settings and then rename the following file: htaccess_COPY.txt     to     .htaccess Note the period symbol (or dot) before the file. This is required!

If your server doesn`t support this feature and you enable it, you could see a '500 Internal Server Error' or a '404 Page Not Found' message. If this is the case, disable this option and remove the '.htaccess' file.

Finally, if you install to a directory that already contains a .htaccess file, you may need to copy the directives from Maian Cart into this file.

Re-Write Base Rule

Some servers require a RewriteBase to be in place. If you have enabled search engine friendly urls and you see a 404 and your server DOES support mod_rewrite, this could be the problem, especially if your store is not in your web root. If this is the case, uncomment the RewriteBase rule line in the .htaccess file. This adjustment may require the inclusion of your installation directory, depending on where the system is installed. Valid examples are: RewriteBase /
RewriteBase /cart/
RewriteBase http://www.example.com/cart/

Re-Write Rules & Missing Folders

Some people get confused with the appearance of rewrite rules. People with limited HTML experience will think that the system is looking for folders that don`t exist. This is fine. To see the structure of the rules see the .htaccess file.

Custom Url Slugs

For products, categories and new pages, custom slugs can be set in your admin area. You can also adjust other slugs by editing the following files to match:

.htaccess
control/seo/md-slugs.php
The custom slugs here are related to the start of urls ONLY. So as an example for special offers, only the BOLD text would be changed in the .htaccess file:

RewriteRule ^special-offers/(.*)/(.*)/(.*)/(.*)$ index.php?p=special-offers&cat=$1&order=$2&next=$3 [nc]

Removing 'index.html' from rewrite rules

Some people prefer not to have the 'index.html' seen as part of the url. To enable this option, log into your Maian Cart admin area. Visit "Settings" > "General Settings" and enable "If enabled, append "index.html" to urls" for the "Enable Search Engine Friendly URLs" option.