1
TBrillon
URL detection and re route on mainfile.php
  • 2004/10/8 22:16

  • TBrillon

  • Just popping in

  • Posts: 9

  • Since: 2002/9/1 7


Ok. I am using the XOOPS 2.0.6 engine behind a firewall. I have users able to connect by using one address (lets say 150.xx.xx.01). This is the internal address and will route directly to this XOOPS site when I call it via a browser. No problem.

Currently no users outside of the firewall can access the site unless they authenticate to an internet portal. Once they are authorized, it redirects them to a new address (say 150.xx.xx.02). This redirection will not connect to XOOPS unless I try to manage the headers that it comes in on.

I need a little help on figuring out the best place to put this code OR if you have something better in mind I'll be happy to enterain it.

I have currently placed it on or around line 45 of the mainfile.php.

Heres the code:
$port = $HTTP_SERVER_VARS['REMOTE_ADDR'];
if($port == '150.xx.xx.02'){
define('XOOPS_URL', ''http://150.xx.xx.02');
} else {
define('XOOPS_URL', 'http://150.xx.xx.01');
}

When I run this as is... it conflicts with common.php which is also trying to execute headers.

Can someone push me in the right direction? Thanks alot for any assistance you all can provide :)

2
DonXoop
Re: URL detection and re route on mainfile.php

I'm not sure what you are trying to do but why the authentication before the website? Usually you just bounce them in to the website from the firewall and let the website handle any authentication if needed. Are you using a DNS hostname in the mainfile.php or a harcoded IP address?

Login

Who's Online

237 user(s) are online (137 user(s) are browsing Support Forums)


Members: 0


Guests: 237


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits