I've been doing the following:
We have both "www" and "non-www", so I need to send the canonical to the www version.
Before I was redirecting all www to non-www, but this messed up the store. I'd rather not mess with .htaccess and just do a canonical.
Is there a way to just get the current page and create a canonical link?
HTML Code:
<mvt:if expr="l.settings:page:code EQ 'CTGY'"> <link rel="canonical" href="https://www.site.com/mm5/merchant.mvc?Screen=CTGY&Category_Code=&mvta:category:code;"> <mvt:elseif expr="l.settings:page:code EQ 'PROD'"> <link rel="canonical" href="https://www.site.com/mm5/merchant.mvc?Screen=PROD&Product_Code=&mvta:product:code;" /> <mvt:elseif expr="l.settings:page:code EQ 'SFNT'"> <link rel="canonical" href="https://www.site.com" /> </mvt:if>
Before I was redirecting all www to non-www, but this messed up the store. I'd rather not mess with .htaccess and just do a canonical.
Is there a way to just get the current page and create a canonical link?
Comment