News:

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

Main Menu

SSI does not work with "www" In URL?

Started by effex, January 14, 2009, 01:19:31 AM

Previous topic - Next topic

effex

Hello everyone I am new to using SSI on other parts of my website, but something I have noticed is that it does not seem to be working such as recognizing a logged in user with "www" in front of my URL.

EXAMPLE:

"http://website.com" <-- works
"http://www.website.com" <-- doesn't work

I did fix the settings in the Server section of my forum Admin, but that didn't change anything.

Can someone explain this to me and why this happens. Would there be a way around this. Many people visit my site using "www".

Orstio

Turn on subdomain independent cookies in SMF.

effex

I did that, but it still isn't working properly.

It's strange, because it does that on my forum and I've noticed it did that on a friend's site that used SMF.

When you visit the forum or site it says "Welcome, Guest" if you include the "www". If you take it out, it recognizes you as "Hey, EFFeX". It's the weirdest thing, but I have to figure it out. My visitors are going to use www to visit the site.

Would there be something that I have to configure on my host?

Bigguy

Have you tried running repair_settings.php ??? Just wondering, when you registered your domain name did you register:

www.yoursite.com

or

yoursite.com

I doubt it would make a difference but figured I would ask.

effex

I registered my domain with www, but I haven't tried the repair yet, I'll go ahead and do that.

effex

#5
Well, no luck so far, but under the Server Settings in my forum there is the field:

Forum URL

When I use www in front of my forum URL I don't get any errors, but when I don't use it it tells me that SSI can't be loaded on other pages of my website. However, by getting no errors, SSI still doesn't seem to be working. It's not loading any functions I try.

It's a strange situation.

EDIT: Strange... It started working again. I really didn't change anything. I'll keep you guys updated on any bugs. Thanks for takin the time to read this.

Bigguy


effex

Quote from: Bigguy on January 14, 2009, 03:12:00 PM
Post back if you need any help. :)

You know it's strange it started acting up again after I closed out of my browser.

This is exactly what is happening.

I go to my main website front page (not SMF) and it displays before anything else:

Notice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/content/e/f/f/effex/html/forum/SSI.php on line 166


HOWEVER, the SSI functions ARE working, such as the welcome message. Now, the interesting thing is if I visit the actual SMF forum and navigate back to the web site's home page, the error message is gone. When I close out of my browser and start back the whole problem starts over again (probably because the Session was ended).

I used "require_once" instead of just "require", because that seemed to work for other people, but even that isn't doing the job.

Any suggestions would be greatly appreciated.

BTW: This is not browser specific, it's Firefox, IE and Opera.

Bigguy

Do you have SSI as the very top line on your homepage. ???

effex

#9
Quote from: Bigguy on January 14, 2009, 03:32:17 PM
Do you have SSI as the very top line on your homepage. ???

Yeah, the first line you will see is line one.


<?php 
require_once("forum/SSI.php");
include(
"global2.php");
include(
"header.php");
include(
"navigation.php");
?>



EDIT: There was a space before the "<?php" and it seems to be working now. All this trouble for that? LOL!

Sorry about all this, I guess after staring at lines of code all night and day you miss the simple things.

Bigguy

No need to be sorry. Hope it's fixed now. :) Post back if you have any other problems.

Advertisement: