How to Enable Search Engine Friendly URLs in TomatoCart

We will show you in this tutorial in a few simple steps how to enable the SEF URLs for your TomatoCart store.

You should first login to our TomatoCart administrator panel:

http://yourdomain.com/admin

If you have installed the script under a subfolder for an example public_html/store the above URL will be:

http://yourdomain.com/store/admin

As the SEF module functions are included already in the TomatoCart installation we will need to just enable them and ensure that if the store is under a subfolder the .htaccess rewrite rules are correctly set. If there isn’t the .htaccess file in the directory, please create it and add the following content into the file:

# $Id: .htaccess $

#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter ‘Options’ to
# the AllowOverride configuration
#
# Example:
#
# <Directory “/usr/local/apache/htdocs”>
# AllowOverride Options
#
#
# ‘All’ with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

SetEnvIf User-Agent “.*MSIE.*” \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

#
# php_value session.use_trans_sid 0
# php_value magic_quotes_gpc 0
#

RewriteEngine on
RewriteBase /

RewriteRule ^([0-9]+)–(.*)$ info.php?articles_categories&articles_categories_id=$1&%{QUERY_STRING} [L]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)–(.*)$ info.php?articles&articles_id=$2&%{QUERY_STRING} [L]
RewriteRule ^([0-9]+)-f-(.*).html$ info.php?faqs&faq_id=$1&%{QUERY_STRING} [L]
RewriteRule ^([0-9]+)-([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html$ products.php?$3&cPath=$1&%{QUERY_STRING} [L]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html$ products.php?$3&manufacturers=$1&%{QUERY_STRING} [L]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html$ products.php?$2&%{QUERY_STRING} [L]
RewriteRule ^([0-9]+)-t-(.*).html$ products.php?tell_a_friend&$1&%{QUERY_STRING} [L]
RewriteRule ^([0-9]+)-(.*).html$ products.php?$1&%{QUERY_STRING} [L]
RewriteRule ^([0-9]+)-(.*)$ index.php?cPath=$1&%{QUERY_STRING} [L]
RewriteRule ^([0-9]+)_(.*)$ index.php?manufacturers=$1&%{QUERY_STRING} [L]
RewriteRule ^contact.html$ info.php?contact&%{QUERY_STRING} [L]
RewriteRule ^sitemap.html$ info.php?sitemap&%{QUERY_STRING} [L]
RewriteRule ^faqs.html$ info.php?faqs&%{QUERY_STRING} [L]

After you have logged into your store admin panel navigate to Start > Modules > Services tab:

The menu which will load has the “Search Engine Friendly URLs” which you may install using the green button right from the name of the module:

That should be all if your store is accessible via yourdomain.com. If you have installed the store under a subfolder yourdomain.com/store one last step is required for the SEF function to work. You should navigate to your cPanel > File Manager and edit the public_html/store/.htaccess file:

RewriteBase / — before the changes
Rewritebase /store/ — after the changes

When the file changes are saved your store SEF urls should load without issues now.

Looking for quality TomatoCart Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , | Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

Leave a Reply

Your email address will not be published. Required fields are marked *


− 1 = 5

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>