Skip to content

Instantly share code, notes, and snippets.

@daubac402
Created September 6, 2019 02:12
Show Gist options
  • Save daubac402/5970ab2c177d9a8cb9bdcb6b359c4911 to your computer and use it in GitHub Desktop.
Save daubac402/5970ab2c177d9a8cb9bdcb6b359c4911 to your computer and use it in GitHub Desktop.
Some of URLs were crawled by Google with "index.php". Redirect "bad" URLs .../index.php to correct once .../, without index.php
# Some of URLs were crawled by Google with "index.php". Redirect "bad" URLs .../index.php to correct once .../, without index.php
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment