> > Kiril Angov wrote: >> $_SERVER['SERVER_NAME']? > > That might return what's configured for the ServerName in teh vhost > config, so won't changed based on the host headers - so you wouldn't be > able to use it anyway. > > The Host: header in HTTP can be set to anything you like, that's how > vhosting works, there's even browser plugins out there to assist you in > doing so I think :) >
Even easier: your hosts file ! Just make a fake name and point it to the right server. You can of course protect your site against this kind of nonsense by making sure the default vhost for that ip points elsewhere. If your site isn't the first site on that ip address and you send a Host-header with an unknown name, the server will just server the first site configured on that ip. Bert-Jan --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en -~----------~----~----~----~------~----~------~--~---
