1

I have a client with a strange set up. In analytics we are seeing urls getting pageviews that technically dont exist.

Example:

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

The current htaccess file looks like this but all that does is redirect these blog urls to the home page.

# Redirect index.php Requests
# ------------------------------
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{THE_REQUEST} !/system/.*
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L]

Is there an htaccess code to create redirects for all urls like this:

Example:

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

to:

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

Thanks

iainn
  • 16,826
  • 9
  • 33
  • 40
Rob5983
  • 31
  • 1

0 Answers0