Redirect 将以index.php结尾的url重定向到清理url

Redirect 将以index.php结尾的url重定向到清理url,redirect,indexing,Redirect,Indexing,我有一个客户有一个奇怪的设置。在分析中,我们看到URL获得了技术上不存在的页面浏览量 示例:website.org/questions/search/blog/2016/07/blog-post-name/index.php 当前的ht访问文件看起来像这样,但所做的只是将这些博客URL重定向到主页 # Redirect index.php Requests # ------------------------------ RewriteCond %{THE_REQUEST} ^GET.*inde

我有一个客户有一个奇怪的设置。在分析中,我们看到URL获得了技术上不存在的页面浏览量

示例:website.org/questions/search/blog/2016/07/blog-post-name/index.php

当前的ht访问文件看起来像这样,但所做的只是将这些博客URL重定向到主页

# Redirect index.php Requests
# ------------------------------
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{THE_REQUEST} !/system/.*
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L]
是否有用于创建重定向的htaccess代码:

示例:website.org/questions/search/blog/2016/07/blog-post-name/index.php

致:website.org/questions/search/blog/2016/07/blog-post-name

谢谢