Hi guys, i have friendly URLs enabled on the site, however i noticed that the same friendly URLs can still be accessed through the original link, leading to potential duplicates ie:
http://www.sitename.com/ and
http://www.sitename.com/index.php?id=1
or
http://www.sitename.com/friendly-url and
http://www.sitename.com/index.php?id=friendly-url_ID
how can I modify my htaccess to redirect (301) all original URLs to their friendly counterparts?
this is my htaccess:
RewriteEngine On
RewriteBase /
# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
# Exclude /assets and /manager directories from rewrite rules
RewriteRule ^(manager|assets) - [L]
# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# Reduce server overhead by enabling output compression if supported.
php_flag zlib.output_compression On
php_value zlib.output_compression_level 5