Solved

problems with URLs to share with google plus

Posted on 2014-02-23
7
201 Views
Last Modified: 2014-03-01
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:

<!-- 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>

Open in new window


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?
0
Comment
Question by:derrida
  • 4
  • 3
7 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39880762
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.
0
 
LVL 1

Author Comment

by:derrida
ID: 39882108
i have changed my function code to this, mod rewrite is on.

 header("HTTP:/1.1 301 Moved Permanently");
                    header ( "Location: {$location}" ) ;
                    exit();

Open in new window


nothing has changed.

any idea?

maybe google just need time?
0
 
LVL 58

Expert Comment

by:Gary
ID: 39883025
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.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 1

Author Comment

by:derrida
ID: 39883426
redirect to another action in the same controller according to the required action.
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39883505
I don't know what server side language you are using but your router should not be redirecting like that - that should be an internal thing, not something you are sending to the browser
0
 
LVL 1

Author Comment

by:derrida
ID: 39884951
I will check that out. but why I have no issue with the same urls with facebook and others?
0
 
LVL 58

Expert Comment

by:Gary
ID: 39886139
Off the top of my head I cannot remember how Facebook checks the url but Google checks it every time.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question