[colug-432] virtual hosts based on ip

Keith Larson klarson at k12group.net
Wed Oct 14 15:01:01 EDT 2015


there was no offense taken.  i understand that what i'm asking about
could easily turn into something that is difficult to
administer/maintain.  i have to weight the benefits of taking this
approach against my current model and see it improves the situation.  in
some ways, this actually makes something more scalable than it already
is today and makes it easier to maintain centrally.
 
i appreciate that i knew i could find the answer in this group.
 >>> Angelo McComis <angelo at mccomis.com> 10/14/2015 2:05 PM >>>

On Wed, Oct 14, 2015 at 1:39 PM, R P Herrold <herrold at owlriver.com>
wrote:


is there a purpose to unsolicited advice and prediction of
gloom? The matter is trivially done with the REMOTE_ADDR
variable and a header() command in PHP, and any mature CGI
environment

I'll poke at a proof of concept backed (by a database so that
it is readily altered as to the redirect page by a site
administrator). Static coding is even easier (load an array
with IP's to go to the execption page, test if the REMOTE_ADDR
is in_array(), and alternatively fall to a different header()

Here is real code to that effect. Problem is that it mixes
data (the IP / URL pairs, and code, which is not usually a
very scalable approach, along with otehr reasons


​Russ,

I didn't see any harm or foul for providing some experience-driven
insight. Look at it this way: Keith may not always be the owner of this,
​and if he hands this off down the road, it may not be to someone as
skilled/capable. 

I certainly don't mean to offend Keith for his question or direction, I
just wanted to provide a slight twist that might be a better choice
that's more easily maintained down the road.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20151014/65b7ce6f/attachment.html 


More information about the colug-432 mailing list