VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: Huubs on May 07, 2021, 09:44:07 am

Title: noindex nofollow on the cart page
Post by: Huubs on May 07, 2021, 09:44:07 am
Hello,

I have a weird issue. I have a Cart menu link, which I set to noindex nofollow, but that meta tag is not inserted into the actual cart page. Anyone has an idea how to do this?
Title: Re: noindex nofollow on the cart page
Post by: sirius on May 07, 2021, 10:06:55 am
Hi,

you can do it in your .htaccess like so :
(just replace the word "cart" with your own cart link)

Code: [Select]
## NOINDEX NOFOLLOW
RewriteCond %{REQUEST_URI} (.*)/cart$ [NC]
RewriteRule ^.*$ - [ENV=NOINDNOFO:true]
Header set X-Robots-Tag "noindex, nofollow" env=NOINDNOFO