We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40453
    • 9 Posts
    Hello,

    I've got the htaccess to direct mysite.com to go to www.mysite.com and www.mysite.com/index.php to www.mysite.com however I'm still able to call duplicates pages from my site like below;

    http://www.mysite.com/page1.htm can be opened (this is OK) - however I can access it also via this URL http://www.mysite.com/page1.htm/

    Any ideas how can I prevent a slash at the end from resolving to the same page?

    my htaccess contains

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mysite\.com
    RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=permanent,L]

    # The Friendly URLs part
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
    RewriteRule ^(.*)index\.php$ http://www.mysite.com/$1 [R=301,L]

    Thanks for any guidance