Ecommerce Templates > Search engine friendly > Converting dynamic to static URLs - ASP Version

Converting dynamic to static URLs - ASP Version

search engine friendly

The default URL for a products page would be something like www.yoursite.com/products.asp?cat=2 but it is possible to change this to something even more search engine friendly like www.yoursite.com/productname.asp. You can also do the same for the category pages and the product detail, the information is outlined below.

Make a copy of products.asp and call it say bobswidgets.asp
Now, open this page in notepad or your web editor and go to HTML view. Now, you should see a set of include files like this:

<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/inc/languagefile.asp"-->
<!--#include file="vsadmin/includes.asp"-->
<!--#include file="vsadmin/inc/incfunctions.asp"-->
<!--#include file="vsadmin/inc/incproducts.asp"-->

Now just add the variable to specify the category before the incproducts include like this for ASP

<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/inc/languagefile.asp"-->
<!--#include file="vsadmin/inc/includes.asp"-->
<!--#include file="vsadmin/inc/incfunctions.asp"-->
<%
explicitid=2
%>
<!--#include file="vsadmin/inc/incproducts.asp"-->

You can now do the same for categories.asp and proddetail.asp by adding the explicitid before:

<!--#include file="vsadmin/inc/inccategories.asp"-->

and

<!--#include file="vsadmin/inc/incproddetail.asp"-->

As the explicit id for a product detail page is a product reference, you have to enclose this in quotes like this:
explicitid="yourprodref"

You can get the variable you need by browsing your site and checking the particular page URL. For example if your URL for a widget looks like this:

www.yoursite.com/products.asp?cat=14

...then you would want to set

<%
explicitid=14
%>

You can also define the static URL in the categories admin page after following the instructions above. This is an optional feature and if you want to use it just place the name of the static page you have created.

Static categories

This now means that your menu system won't pick up on the dynamic URLs as the store is browsed. It also works with the CSS dynamic menu and avoids duplicate URLs / content on the store.

In version 4.9.6 we added linked product detail static pages where there is now an option in the product admin page "Has static page" which if checked will cause the product detail page link to take the form. . .
the_product_name.asp
. . . where the page name will be made of the product name, in lower case with spaces replaced by underscores and non alphanumeric characters removed. It will be your responsibility to create the static detail page of that name using the method above.

In version 5.1 we added the ability to change the underscore to the character of you choice so if you prefer the layout of the-product-name.asp then you will need to add this to includes.asp

urlfillerchar="-"

Top of page

Dynamic title and meta description tags on static pages

One of the advantages of setting up static pages is that you can add your own meta and title tags manually page by page. It is however possible to use dynamic title and meta description tags if you prefer. The method is the same as described here but with a couple of small differences. You will need to define the explicitid, catid or prodid somewhere before the metainfo include line so for the ASP version the top of the code would look something like this

<%
explicitid="prodref"
prodid="prodref"
%>
<!--#include file="vsadmin/db_conn_open.asp"-->
<!--#include file="vsadmin/inc/languagefile.asp"-->
<!--#include file="vsadmin/includes.asp"-->
<!--#include file="vsadmin/inc/incfunctions.asp"-->
<!--#include file="vsadmin/inc/metainfo.asp"-->

If you are setting this up on a categories page, you'd want to use catid rather than prodid. For the manufacturers page that would be manid.

Top of page

More search engine friendly features from Ecommerce Templates

Top of page