News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Problem with friendly URLS and PHPSESSID

Started by nfh, March 13, 2012, 01:03:15 PM

Previous topic - Next topic

nfh

 Hi,

I am having some issues with SMF due to some messed up URL's that are getting the PHPSESSID variable at the wrong part.
As far as I'm aware, URL's on any given page of a SMF forum get a PHPSESSID on the first access within a session. That is what is happening with my forum and that PHPSESSID variable disappears as soon as I click on any link. In this case the URL gets the PHPSESSID appended at the end, such as this:
http://forum.rumoasantiago.com/index.php/board,3.0.html?PHPSESSID=0220908660317600cce2d587e78d96ce [nofollow]

Nonetheless, if I try to add this link (without the PHPSESSID part) to Facebook, it isn't working because that PHPSESSID variable messes up the URL. Here's the canonical URL as reported by the Facebook's debug tool [nofollow]:
http://forum.rumoasantiago.com/index.php?PHPSESSID=2b5151d1aa69e29f2aabd42ec79e0d86&%2Fboard%2C3.0.html [nofollow]

As you can see, the variable goes imediately after the index.php part of the "friendly URL". This makes the original URL unusable.

So I have two questions:
1) is there a way to prevent this from happening? I know that PHPSESSID is needed for the first visit and for such cases where users don't have cookies enabled, but there's got to be a way to maintain friendly URL's and still having the PHPSESSID properly placed within the URL;

2) will this issue mess with search engine indexing? If that PHPSESSID is inserted on URL's during a web crawl, due to the "sessionless" nature of crawlers they will get multiple different URL's for the same landing pages. Or does SMF have any protection mechanism to avoid this?

nfh

Isn't there anyone experiencing the same problem?

Kermit

My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

nfh

Unfortunately that doesn't seem to do the trick.

Curiously, links on this forum (simplemachines.org) don't get any PHPSESSID variable on the URL... why is that so?

Kermit

My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Quote
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

maestrosite.ru

#5
Quote from: nfh on March 15, 2012, 06:48:04 PM
Unfortunately that doesn't seem to do the trick.
Have you problem with mods?
I see you install mod, and Facebook debuger tool from start page:
https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fforum.rumoasantiago.com%2Findex.php%2Fboard%2C3.0.html
show equals fetched and canonical URLs

and show real canonical URL if requested URL with session variable:
http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fforum.rumoasantiago.com%2Findex.php%3FPHPSESSID%3D2b5151d1aa69e29f2aabd42ec79e0d86%26%252Fboard%252C3.0.html
First of all, sorry for my english. По-русски у меня получается значительно лучше.

Проблема на форуме? Сначала посмотрите лог ошибок вашего форума и лог ошибок сайта (error_log)

You can try other modifications - see demo

Advertisement: