MyBB Central

Full Version: How to get thread url when using Google SEO
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using google seo url's and my topic url looks like this:

aaa.com/Thread-test-topic

How do I get using php the current thread url ? (not the showthread=$tid stuff, the seo link) ?




@LE

Ok, here's how I did it:

Code:
$location = get_current_location();
$location = str_replace("/showthread.php?google_seo_thread=", "Thread-", $location);
$pos1 =strrpos($location,"&");
if (!$pos1===false) {
$location=substr($location,0,$pos1);
};
$url_share="http://www.MYSITE.com/".$location;

$url_share will contain the url I need without parameters. Hopefully it's ok !
im might test it out.