0

I am trying to add the Facebook Comment plugin to my site.
http://www.ourhometown.ca/hockey/nhl/NHL0017.php

When you visit the link in Firefox you get the above URL. If you hit refresh, you get something like:
http://www.ourhometown.ca/hockey/nhl/NHL0017.php#.UbAQAth230c

This lack of a static url will cause issues for the site. Does anyone know how to tweek the code so that the query string doesnt show and the url will always be - http://www.ourhometown.ca/hockey/nhl/NHL0017.php

Any help would be appreciated.

3
Contributors
2
Replies
19
Views
4 Years
Discussion Span
Last Post by cereal
0

Does anyone know how to tweek the code so that the query string doesnt show and the url will always be -

That hash # is more related to Javascript. I don't see much Daniweb members post URL rewrite in PHP that has #.

You can try this (PHP):

$url = preg_replace('/\#.*/', '', $url);

or this

str_replace( $_SERVER['QUERY_STRING'], '', $_SERVER['HTTP_REFERER'] )
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.