I am using this htaccess code to hide .html extention on my website, but when doing so addThis share plugin is not working. You can find addThis here: https://www.addthis.com/get/sharing
Is there any workaround for this?
RewriteBase /
RewriteEngine on
RewriteCond %{THE_REQUEST} \ /(.+/)?index(\.html)?(\?.*)?\ [NC]
RewriteRule ^(.+/)?index(\.html)?$ /%1 [R=301,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^(.+)\.html$ /$1 [R=301,L]
RewriteCond %{SCRIPT_FILENAME}.html -f
RewriteRule [^/]$ %{REQUEST_URI}.html [QSA,L]
It is currently not possible to total share counts for different URLs:
http://support.addthis.com/customer/portal/questions/206634-can-i-total-share-counts-for-two-different-urls-short-and-full-for-the-same-content-
and it’s not a problem with the redirect, but an issue with addthis code.
You should have used the redirection code from the beginning.