Reputation: 1033
I have an old website where I need to redirect index.php to the root to prevent duplicate content. Normally I'd use the following:
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php
RewriteRule ^index\.php$ / [L,R=301]
The problem is, I have some pages such as index.php?id=6, index.php?id=14 that I don't want redirecting to the root.
How could I amend the above .htaccess rule to exclude index.php files that contain these query strings?
Thanks,
Liam
Upvotes: 0
Views: 221