Creating SEO URL's without generating HTML pages

1. Create an .htaccess or alter your apache config file to add the the following mod_rewrite entries:

RewriteEngine on
Options +FollowSymLinks
RewriteBase /

RewriteRule catalog/([a-zA-Z0-9-.]*)/([a-zA-Z0-9-.]*)-([0-9]*).html$ /index.php?l=product_detail&p=$3
RewriteRule catalog/new-products-0-1.html$ /index.php?l=product_list&c=new
RewriteRule catalog/new-products-0-([0-9]*).html$ /index.php?pg=$1&l=product_list&c=new
RewriteRule catalog/([a-zA-Z0-9-.]*)-0-1.html$ /index.php?l=product_list&c=$1
RewriteRule catalog/([a-zA-Z0-9-.]*)-0-([0-9]*).html$ /index.php?pg=$2&l=product_list&c=$1
RewriteRule catalog/m-([a-zA-Z0-9-.]*)-([0-9]*)-1.html$ /index.php?l=product_list&m=$2
RewriteRule catalog/m-([a-zA-Z0-9-.]*)-([0-9]*)-([0-9]*).html$ /index.php?pg=$3&l=product_list&m=$2
RewriteRule catalog/([a-zA-Z0-9-.]*)-([0-9]*)-1.html$ /index.php?l=product_list&c=$2
RewriteRule catalog/([a-zA-Z0-9-.]*)-([0-9]*)-([0-9]*).html$ /index.php?pg=$3&l=product_list&c=$2
RewriteRule catalog/([a-zA-Z0-9]*).html$ /index.php?l=page_view&p=$1
RewriteRule catalog/([a-zA-Z0-9.]*)-([a-zA-Z0-9.]*).html$ /index.php?l=page_view&p=$1_$2
RewriteRule catalog/([a-zA-Z0-9.]*)-([a-zA-Z0-9.]*)-([a-zA-Z0-9]*).html$ /index.php?l=page_view&p=$1_$2_$3

2. Open the index.php and change the lines containing:

// Set Base URL
if ($_GET[setbase] == 1) $index[base_url] = '<base href="'.((is_secure())?$settings[secureurl]:$settings[shopurl]).'" />';


// Set Base URL
$index[base_url] = '<base href="'.((is_secure())?$settings[secureurl]:$settings[shopurl]).'" />';

3. Lastly, on the "Generate HTML Pages" area of the general setting within the admin, change the "Manufacturer Page Format:" from




You are all set! Now just turn HTML pages on. No need to generate HTML pages though. Additionally, making any changes to the format of URL's will require some slight mods to the rewrites.

  • Email, SSL
  • 93 Users Found This Useful
Was this answer helpful?

Related Articles

Adding "Add To Cart" to your own HTML pages.

Assuming you have your own button image and know the path/url to it, you would add the following...

Assigning specific real-time shipping options to products.

Note: Before you get started you should create a backup of "global.php"! The following...

Altering template text and language variables.

In this example we will alter the text in the Welcome Message template. Method 1: 1. In your...

Adding additional tabs on the product detail page.

To add additional tabs on the product detail page, you will need to alter the...

Customizing the main_index.html template.

The main "framework" of SunShops design is located within the main_index.html template. Most of...