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:

Code:
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:

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

to

Code:
// 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

Code:
{manufacturer_name}-{manufacturer_id}-{page}.html

to

Code:
m-{manufacturer_name}-{manufacturer_id}-{page}.html

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
  • 64 Users Found This Useful
Was this answer helpful?

Related Articles

General HTML modification information.

In general, we are unable to assist with HTML modifications within the templates or style sheets...

Assigning specific real-time shipping options to products.

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

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...

Altering template text and language variables.

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

Customizing the main_index.html template.

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