Author Topic: noindex nofollow on the cart page  (Read 421 times)

Huubs

  • Jr. Member
  • **
  • Posts: 294
noindex nofollow on the cart page
« 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?

sirius

  • Jr. Member
  • **
  • Posts: 111
    • OCTeam
  • VirtueMart Version: 3.8.6
Re: noindex nofollow on the cart page
« Reply #1 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
J3.9.27 | PHP7.4.20 + APC + Opcode
VM Prod : 3.8.6 | VM Test : 3.8.9