Topic: Redirecting Error: Other users redirected to 'localhost' and not IP
Ok, I did not have a problem with this beforehand until today.
Mark and I were working on a second navigational bar and then encountered a weird error suddenly out of the blue.
Below are the steps we did.
______________________________________________________________________
1. We edited main.tpl to put:
<pun_navibar2> under <pun_status>. (worked)
2. We edited header.php and put in:
// START SUBST - <pun_navlinks2>
$tpl_main = str_replace('<pun_navlinks2>','<div id="brdmenu" class="inbox">'."\n\t\t\t". generate_navlinks2()."\n\t\t".'</div>', $tpl_main);
// END SUBST - <pun_navlinks2>
underneath the <pun_status> indicator code. (worked)
3. We edited functions.php with:
//
// New navbar
//
function generate_navlinks2()
{
global $pun_config, $lang_common, $pun_user;
// Index and Userlist should always be displayed
$links[] = '';
// Are there any additional navlinks we should insert into the array before imploding it?
if ($pun_config['o_additional_navlinks'] != '')
{
if (preg_match_all('#([0-9]+)\s*=\s*(.*?)\n#s', $pun_config['o_additional_navlinks']."\n", $extra_links))
{
// Insert any additional links into the $links array (at the correct index)
for ($i = 0; $i < count($extra_links[1]); ++$i)
array_splice($links, $extra_links[1][$i], 0, array('<li id="navextra'.($i + 1).'">'.$extra_links[2][$i]));
}
}
return '<ul>'."\n\t\t\t\t".implode($lang_common['Link separator'].'</li>'."\n\t\t\t\t", $links).'</li>'."\n\t\t\t".'</ul>';
}
(worked)
So the navi bar did work when done and at the top bar only the 'manditory links' such as:
* Index
* User list
* Search
* Profile
* Messages
* Administration
* Logout
Were on the first bar, and on the second was :
* Shop
* Bank
* Lottery
* Donate
* Dictionary
* IRC Chat
as it should be.
______________________________________________________________________
However, suddenly it started redirecting people to 'localhost' instead of my ip like it use to.
Now, I did have http://localhost/Forum as the 'Base URL' in Admin>Options from the very start for the past few months, and it never redirected people when they logged in and out to 'localhost', it redirected them back to the original ip link they came from for the links below:
* Index
* User list
* Search
* Profile
* Messages
* Administration
* Logout
and also when they go to post a topic, post, and PM message it redirects them as well. The links on the bottom navi bar are 'extra' and are set up with the IP address, which those work fine and do not redirect the users.
After trying to figure out what happened we are somewhat lost of how to fix this back to how it was.
If I change the Base URL in the Admin>options to the ip that the users normally go to then I am unable to do anything as administrator because then I get the BAD_REFFERER_HTTP error, while they can do stuff. If I leave it at 'localhost' for me then I can work on it but now the users are being suddenly redirected; which never happened before today.
I need help to figure out why this suddenly changed and how to fix it.
Would getting a domain name for the forum and entering THAT as the base url in Admin>options work for both myself and the users?
Or is there another way? Or can we get this working how it was?
~Luna