News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Why My Forum Is Showing This Symbol in URL

Started by Xpresskonami, October 03, 2018, 10:28:39 PM

Previous topic - Next topic

Xpresskonami

hello.. i dont know why my forum url is including the symbols "?" , for example http://www.url.com/?Themes/SMF/css/index.css?fin20;PHPSESSID=7aba0d611b47fb078889c8c31b59975c Any time i vivist my website it display without the css, and if i later reload the page the css will display.

And it suppose to be in this format
http://www.url.com/Themes/SMF/css/index.css

Please any solution to fix the ? in the url link

Deaks

this is not a bug that is your session id ....
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Xpresskonami

Quote from: BryanD on October 03, 2018, 10:36:37 PM
this is not a bug that is your session id ....
oh ok... how can i fix the session id ???

Biology Forums

That's how PHP communicates with the URL. It's not an issue, it's normal, nearly every PHP based website has it, unless the URL's are "prettified"

Xpresskonami

Quote from: Study Force on October 03, 2018, 10:43:32 PM
That's how PHP communicates with the URL. It's not an issue, it's normal, nearly every PHP based website has it, unless the URL's are "prettified"

okay. ut i think the problem is from redirecting because i got a new domain and redirect the new domain to my old domain, if i access my old url domain no error and it works perfectly. check here for sample [NEW DOMAIN: www.spyloadedng.com and the OLD DOMAIN: www.spyloaded.com] try to visit the url and see what i was trying to figure out


Arantor

No, what he has is not normal.

In fact what he has done is removed index.php from the URL which breaks the session injector when it tries to add the session to links, ending up injecting the session (incorrectly) to CSS links.

It always works fine on reload because there is a cookie there and the session injector doesn't trigger.

Put the index.php back in the URL.

Biology Forums

I didn't notice the index.php ... ? is normal though

Arantor

It's not normal.

Firstly, this is a link to a stylesheet. This should NEVER have the session in it anyway. That aside it shouldn't have the ? before the Themes/SMF part.

These happen because $scripturl is empty causing it to match URLs where it shouldn't and end up rewriting links to include a session that shouldn't. For the theme URLs the rewrite breaks them. And on the refresh, SMF sees a cookie and doesn't enable the rewrite which is why it works like the OP said.

Xpresskonami

Quote from: Arantor on October 04, 2018, 02:35:39 AM
No, what he has is not normal.

In fact what he has done is removed index.php from the URL which breaks the session injector when it tries to add the session to links, ending up injecting the session (incorrectly) to CSS links.

It always works fine on reload because there is a cookie there and the session injector doesn't trigger.

Put the index.php back in the URL.

Can you please tell me where to do that, i cant indicate where i can activate it in the admin page

Biology Forums

@Arantor, having a ? in the URL is normal, stop making it a big deal.

Chen Zhen

Did you attempt to use the repair settings tool to ensure all URL's and paths are set correctly?

My SMF Mods & Plug-Ins

WebDev

"Either you repeat the same conventional doctrines everybody is saying, or else you say something true, and it will sound like it's from Neptune." - Noam Chomsky

Kindred

StudyForce... you are wrong.

Havign a ? before the argument is fine... having the ? elsewhere is improper.
The URL as presented shows a distinct problem which you are missing - I'm not a developer and even I noticed the problem. Don't argue with one of the former developers when it comes to basic coding.

The error is clear, as Arantor says...
Xpresskonami removed the index.php
that will break ALOT of things and should not be done... and there is no need to do it.



Xpresskonami - there is not option to reactivate it, because there is no option to remove it.
You either applied a mod or manually changed the code to remove index.php.

remove the mod, or change the code back to the default.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Quote from: Study Force on October 04, 2018, 08:52:23 PM
@Arantor, having a ? in the URL is normal, stop making it a big deal.

The URL has two. Look again at what the OP posted:

http://www.url.com/?Themes/SMF/css/index.css?fin20;PHPSESSID=7aba0d611b47fb078889c8c31b59975c

Notice the url.com/?Themes/SMF part. That is not normal. Notice also that this is a session link to the CSS which is broken, but sure, ignore the fact that the OP is reporting a situation that has literally been known about for years.

To fix, remove the "remove index.php from url" mod if it is installed and double check that in Sources/QueryString.php, that the line:

$scripturl = $boardurl . '/index.php';


is present. If you're not sure, upload the file and I'll take a look.

Advertisement: