0

We have a website using a AJAX plugin which puts a #! at the start of each page on the website. Example of a page is: http://www.exit8.tv/#!bellybang-2013-mr-mob-dj-performance/

We are trying to get the URL using PHP as to store in a meta tag when the page loads. And is important for sharing via Facebook as Facebook won't run Javascript and will share the default homepage and not the blog page open.

Please help as the theme developer doesn't know how to fix this.

Thanks in advance

  • Actually, you get rid of whatever code is generating [URLs with `#!` in them](http://stackoverflow.com/q/3009380/1068283). Preferably before anyone notices. This was a dirty hack to allow certain poorly designed web application frameworks to have their content crawled by Google, and really shouldn't be used if at all possible. – Michael Hampton Nov 14 '13 at 04:44

1 Answers1

2

everything after the # is not captured at the server level, it is called a fragment, as the browser will strip it away before sending to the server-side. per RFC 3986

the ajax script probably takes the fragment and translates it to parameters that it passes back to the php page, the best way to capture the fragment is to reconstruct it from the get/post parameters.

Greg
  • 642
  • 6
  • 7