Solved

problems with URLs to share with google plus

Posted on 2014-02-23
7
211 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Node.js 11 82
Handling case and special names in javascript 3 52
JQuery Data Table Default Sort 2 34
Google map API and Coldfsuion 4 32
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
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 …
The viewer will learn how to dynamically set the form action using jQuery.
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)
Suggested Courses

752 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