My .htaccess file has rewrite rules that contains wildcard characters.
RewriteRule (.*) /mm5/merchant.mvc?Screen=PROD&Product_Code=%1&Store_Cod e=E [L]
RewriteCond %{REQUEST_URI} ^/(.*)/(.*)/(.*)(.*) [NC]
This was originally implemented to display the product's name in the URL and generated this format of link:
/categorycode/productcode/Full+Product+Name+Is+Here.htm
This naming format has become awkward over the years. While any version of the product's name successfully redirects thanks to the wildcard character, there have ended up being several versions of links that exist for each product and it is impossible to account for with individual redirects. (product+name+here.htm, Product+Name.htm, productname.htm, PRODUCT.htm)
I am updating the site and want to use URI Management to handle 301 redirects instead of an .htaccess file. Is there a way to handle the wildcard product name when creating a 301 redirect in the URI Product Template language? Basically, how do I replicate the wildcard character so that all variations of the product name redirect to the canonical link version?
This???
/<mvt:do name="l.return" file="g.Module_Library_DB" value="Category_Load_ID( l.settings:product:cancat_id, l.category )" /><mvt:eval expr="l.category:code" />/&mvt:product:code;/*.htm
Where * is the product name.
Thank-you,
Shannon
RewriteRule (.*) /mm5/merchant.mvc?Screen=PROD&Product_Code=%1&Store_Cod e=E [L]
RewriteCond %{REQUEST_URI} ^/(.*)/(.*)/(.*)(.*) [NC]
This was originally implemented to display the product's name in the URL and generated this format of link:
/categorycode/productcode/Full+Product+Name+Is+Here.htm
This naming format has become awkward over the years. While any version of the product's name successfully redirects thanks to the wildcard character, there have ended up being several versions of links that exist for each product and it is impossible to account for with individual redirects. (product+name+here.htm, Product+Name.htm, productname.htm, PRODUCT.htm)
I am updating the site and want to use URI Management to handle 301 redirects instead of an .htaccess file. Is there a way to handle the wildcard product name when creating a 301 redirect in the URI Product Template language? Basically, how do I replicate the wildcard character so that all variations of the product name redirect to the canonical link version?
This???
/<mvt:do name="l.return" file="g.Module_Library_DB" value="Category_Load_ID( l.settings:product:cancat_id, l.category )" /><mvt:eval expr="l.category:code" />/&mvt:product:code;/*.htm
Where * is the product name.
Thank-you,
Shannon
Comment