문제

I have a "Like" and a "+1" Button on my Startpage.

But when you enter "www.example.com" you get different like-stats and +1-stats als when you get "www.example.com/Default.aspx".

But in the background the site (of course) is the same.

How to redirect "www.example.com" to "www.example.com/Default.aspx" without a neverending circle-reference?

도움이 되었습니까?

해결책

For your Facebook like and Google +1 button, be explicit in specifying the url that you want to collect likes on.

Google +1:

<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone href="http://www.site.com></g:plusone>

Faceboook like:

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId=189736484409061&amp;xfbml=1"></script>
<fb:like href="http://www.site.com"></fb:like>

Also, you should look into doing 301 redirects from /default.aspx to / so search engines don't think you are having duplicate content.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top