1) Install ISAPI_REWRITE 3
ISAPI_REWRITE 3 is a URL rewrite module for IIS. There are currently 2 version of this module available, Lite and Full version. The lite version is available for free with limitation. This module can be purchased or downloaded from :
http://www.helicontech.com/isapi_rewrite/
2) Edit the httpd.conf or .httaccess file.
For the lite/free version of the software, this file can be located inside the installation folder of ISAPI_REWRITE (C:\program files\helicon\ISAPI_Rewrite3). For the full version, a file called ".httaccss" file must be created and be placed at the root folder.
Paste the following code to the file and save it :
If your shopping cart is at the root folder :
RewriteEngine
on
RewriteBase
/
RewriteRule
[^?/]*-(\d+)\.htm shopexd.asp?ID=$1 [QSA]
RewriteRule
[^?/]*-c(\d+)\.htm shopdisplayproducts.asp?ID=$1 [QSA]
RewriteRule [^?/]*-cat(\d+)\.htm
shopdisplaycategories.asp?ID=$1 [QSA]
If your shopping cart is in the folder "SHOPPING"
RewriteEngine on
RewriteBase
/
RewriteRule
shopping/[^?/]*-(\d+)\.htm shopping/shopexd.asp?ID=$1 [QSA]
RewriteRule
shopping/[^?/]*-c(\d+)\.htm shopping/shopdisplayproducts.asp?ID=$1
[QSA]
RewriteRule
shopping/[^?/]*-cat(\d+)\.htm shopping/shopdisplaycategories.asp?ID=$1
[QSA]
The above rule will rewrite the following URL :
For example :
3) Modify VP-ASP files to generate links to friendly URL.
There are currently 2 methods to tell VP-ASP to generate the friendly URL. The first method that does not require customization is to enter the friendly URL using the format above to the field "cdescurl" and also disable "xaddcatalogid"
For example:
For the product apple set with the catalog id 12, please set the "Extended Description Page" of this produc to "Apple-Set-12.htm". This field should always use the format ProductName-catalogid.htm or else the URL Rewrite engine will not work.
The disadvantage of the method above is that it will only generate the friendly URL link to the extended descrption page. Category listing page will still use the default shopdisplayproducts.asp or shopdisplaycategories.asp
For the second method, VP-SAP will automatically generate the friendly URL and also the URL of the category listing pages. This will require some customization on the files. Please open the file listed below and perform the modification per the instruction :
shopproductformat.asp
Locate the following code :
(approximately line 342 and 348)
Replace it with : shopdisplaycategories.asp
Locate the following code : (approximately line 227 to 237)
modify it to :