derrida
asked on
problems with URLs to share with google plus
hi
I have sharing on my site for other services and it works great. I wanted to add a google plus share button. so I checked google and I use this code:
my site is multi language one. I have no problems sharing in the Hebrew section of the site but cannot share the url in the English section.
an example from the Hebrew section:
http://shtigliz.com/page/about
an example from the English section:
http://shtigliz.com/page/abouten
when I try to share manually I get the same result: the Hebrew one is accepted while the English one I get the message: cannot load the site.
what am I missing here?
I have sharing on my site for other services and it works great. I wanted to add a google plus share button. so I checked google and I use this code:
<!-- Place this tag where you want the +1 button to render. -->
<div class="g-plusone"></div>
<!-- Place this tag after the last +1 button tag. -->
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/platform.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
my site is multi language one. I have no problems sharing in the Hebrew section of the site but cannot share the url in the English section.
an example from the Hebrew section:
http://shtigliz.com/page/about
an example from the English section:
http://shtigliz.com/page/abouten
when I try to share manually I get the same result: the Hebrew one is accepted while the English one I get the message: cannot load the site.
what am I missing here?
You have temporary (302) redirects on the url. You also have one on the Hebrew as well but it may be that Google already has a copy of the page so it doesn't need to check it again.
ASKER
i have changed my function code to this, mod rewrite is on.
nothing has changed.
any idea?
maybe google just need time?
header("HTTP:/1.1 301 Moved Permanently");
header ( "Location: {$location}" ) ;
exit();
nothing has changed.
any idea?
maybe google just need time?
Why are you doing a redirect in the first place, you are just redirecting to the same page
Anyway your site is still doing a 302 redirect and a 301 redirect.
Anyway your site is still doing a 302 redirect and a 301 redirect.
ASKER
redirect to another action in the same controller according to the required action.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I will check that out. but why I have no issue with the same urls with facebook and others?
Off the top of my head I cannot remember how Facebook checks the url but Google checks it every time.