Web business consultants

Business Management Help for Website Owners

Alternative Short URLs to Product Pages

In the search engine friendly links tutorial, we showed you how to create a specific type of link to a product page, from a category page - i.e. one that looked like this:
http://www.mydomain.com/pc/Adv_Sales/Semin/Advanced+Sales+Seminar
where:

Domain http://www.mydomainname.com
Product Code Adv_Sales
Product Name Advanced Sales Seminar
Category Code Semin
Category Name Seminars
Store Code Develop

But, what if you prefer one of these alternative link styles?

  1. http://www.mydomainname.com/pc/Adv_Sales/Seminars/Advanced+Sales+Seminar
  2. http://www.mydomainname.com/pc/Adv_Sales/Semin/Advanced+Sales+Seminar.html
  3. http://www.mydomainname.com/pc/Adv_Sales/Seminars/Advanced+Sales+Seminar.html
  4. http://www.mydomainname.com/pc/Seminars/Adv_Sales/Advanced+Sales+Seminar.html
  5. http://www.mydomainname.com/pc/Seminars-Adv_Sales-Advanced+Sales+Seminar.html

Then, here are the changes you would make to your link in the CTGY Category Product List Layout and to the .htaccess file:

Original: http://www.mydomainname.com/pc/Adv_Sales/Semin/Advanced+Sales+Seminar and also
1. http://www.mydomainname.com/pc/Adv_Sales/Seminars/Advanced+Sales+Seminar:

Mod_Rewrite instruction:

RewriteCond %{REQUEST_URI} ^/pc/(.*)/(.*)/(.*) [NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=PROD&Product_Code=%1&Category_Code=%2&Store_Code=Develop [L]

i.e. there is no change to the Mod_Rewrite instruction from that contained in the original tutorial.

Then the following links in the CTGY Category Product List Layout give these URLs:

Original. <a href="/pc/&mvta:product:code;/&mvta:category:code;/&mvta:product:name;"> gives the URL: http://www.mydomainname.com/pc/Adv_Sales/Semin/Advanced+Sales+Seminar
1. <a href="/pc/&mvta:product:code;/&mvta:category:name;/&mvta:product:name;"> gives the URL: http://www.mydomainname.com/pc/Adv_Sales/Seminars/Advanced+Sales+Seminar

2. http://www.mydomainname.com/pc/Adv_Sales/Semin/Advanced+Sales+Seminar.html and also
3. http://www.mydomainname.com/pc/Adv_Sales/Seminars/Advanced+Sales+Seminar.html:

We need to add (.*) to the Mod_Rewrite instruction:

RewriteCond %{REQUEST_URI} ^/pc/(.*)/(.*)/(.*)(.*) [NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=PROD&Product_Code=%1&Category_Code=%2&Store_Code=Develop [L]

Then the following links in the CTGY Category Product List Layout give these URLs:

2. <a href="/pc/&mvta:product:code;/&mvta:category:code;/&mvta:product:name;.html"> gives the URL: http://www.mydomainname.com/pc/Adv_Sales/Semin/Advanced+Sales+Seminar.html
3. <a href="/pc/&mvta:product:code;/&mvta:category:name;/&mvta:product:name;.html"> gives the URL: http://www.mydomainname.com/pc/Adv_Sales/Seminars/Advanced+Sales+Seminar.html

SEO Information and Tools:

4. http://www.mydomainname.com/pc/Seminars/Adv_Sales/Advanced+Sales+Seminar.html

We reverse the order of the Product code and Category code in the Mod_Rewrite instruction:

RewriteCond %{REQUEST_URI} ^/pc/(.*)/(.*)/(.*)(.*) [NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=PROD&Category_Code=%1&Product_Code=%2&Store_Code=Develop [L]

Then the following link in the CTGY Category Product List Layout gives this URL:

4. <a href="/pc/&mvta:category:name;/&mvta:product:code;/&mvta:product:name;.html"> gives the URL: http://www.mydomainname.com/pc/Seminars/Adv_Sales/Advanced+Sales+Seminar.html

5. http://www.mydomainname.com/pc/Seminars-Adv_Sales-Advanced+Sales+Seminar.html

We replace two of the backslashes with hyphens in the Mod_Rewrite instruction:

RewriteCond %{REQUEST_URI} ^/pc/(.*)-(.*)-(.*)(.*) [NC]
RewriteRule (.*) /mm5/merchant.mvc?Screen=PROD&Category_Code=%1&Product_Code=%2&Store_Code=Develop [L]

Then the following link in the CTGY Category Product List Layout gives this URL:

a) <a href="/pc/&mvta:category:name;-&mvta:product:code;-&mvta:product:name;.html"> gives the URL: http://www.mydomainname.com/pc/Seminars-Adv_Sales-Advanced+Sales+Seminar.html

Internet Marketing Engine - Web business consultants to small & mid-size organizations
Privacy and Security

Phone: Chicago +1 (708) 401-0421 or Melbourne, Australia +61 (3) 9670-1165

Copyright © 2000-2008 Internet Marketing Engine Australia USA. All rights reserved.

Link to a Product from a Category Page - AlternativesAbout Us|Contact Us|Site Map|Home