SMF Support > SMF 2.0.x Support

Nothing showing up for viewers outside network

<< < (6/6)

bigbass1997:
I dont know if there is an option like that. If there is I would love to hear how to do so. Also my database is hosted on my computer as well, and for those who dont think its very secure, I can assure you its secure.

MrPhil:
All I can suggest is that you do some experimenting. In Settings.php, just before $boardurl is set, print out the referrer:

--- Code: ---echo "<!-- Settings.php sees HTTP_REFERER as '". $_SERVER['HTTP_REFERER'] . "' -->\n";
--- End code ---
You'll have to look in your View > Page Source to see the comment. If the $_SERVER element isn't defined in your server, try getenv('HTTP_REFERER'). It's possible that this comment will come early enough to cause a "headers cannot be sent" error, but that's OK for diagnostic purposes/experimentation. You'll be removing it as soon as you find the difference in how localhost and domain name access show up.

Hopefully you'll see some difference between WAMP use (localhost) and domain name use, that you could use something like:

--- Code: ---if ($_SERVER['HTTP_REFERER'] == '') {
   $boardurl = 'http://localhost'; 
} else {
   $boardurl = 'http://bigbass1997.....;
}

--- End code ---
This assumes the REFERER is empty when localhost. Give it a try.

Navigation

[0] Message Index

[*] Previous page

Go to full version