在 Magento 中阻止 rss

Block rss in Magento

我需要在我的网站上屏蔽此 URL:https://example.com/rss/catalog/notifystock/

我写了以下代码来阻止:

RewriteRule ^(index.php/?)?rss/ - [L,R=403]

但它阻止了以下 URL:https://example.com/index.php/rss/catalog/notifystock/

它没有阻止这个 URL: https://example.com/rss/catalog/notifystock/

谁能帮忙

尝试改用此规则:

RewriteRule rss - [F]

应该做的是阻止访问任何在 URL 中包含 rss 的页面。您还可以使用:

<FilesMatch "rss$">
    order allow,deny
    deny from all
</FilesMatch>

因此,如果文件与 rss 匹配,那么它将拒绝所有人访问。但是,如果您使用的是 Apache 2.4,则它将是:

<FilesMatch "rss$">
    Require all denied
</FilesMatch>