由 hrs 提交于 2022/05/27 - 06:51 , 周五 默认情况下在 URL 中添加 /index.php/ 以便如何从 Drupal 8 中的 URL 中删除 index.php 我在 .htaccess 文件中添加了以下代码,然后问题已解决 RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L] 您可以尝试停止在 Google 或其他搜索引擎中将此类 URL 编入索引的其他方法 在 robots.txt 中添加以下代码 Disallow: /index.php/* 标签 Drupal 登录或注册以发表评论