Solved

problems with URLs to share with google plus

Posted on 2014-02-23
7
191 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
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…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now