Solved

problems with URLs to share with google plus

Posted on 2014-02-23
7
206 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

830 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