Apache - .htaccess - 仅重定向以“/feed”结尾的 URL

Apache - .htaccess - Redirect only URLs ending with "/feed"

我只想重定向以 /feed 结尾的 URL(常量 404s - 来自亚马逊服务器? - 使用错误的 url)。如何配置重定向?

目前我的 .htaccess 文件看起来像这样。我正在尝试在传入 url.

之前添加一个文件夹/category
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
Redirect 301 /mobile-home /
Redirect 301 /destinations-3/greeter-destinations/ /greeter-destinations/
Redirect 301 /destinations-3/ /category/destinations/
RewriteRule ^index\.php$ - [L]
#RewriteCond %{REQUEST_URI} !^/content/
#RewriteRule ^(.*)/feed$ content/category//feed [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

2 个“#”行取自另一个线程,但它们没有任何作用。

感谢您的帮助

下面的代码将对与您的模式匹配的网址执行永久重定向:

RewriteRule ^destinations/(.*)/feed$ /category/destination//feed [L,R=301]

希望对您有所帮助!