Ian P. Christian wrote: > 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 :) > > > I did not realize that it takes that parameter from the HTTP Headers rather than the server config, otherwise I agree that while apache sanitizes to extend the Host: header, there are many other webservers that probably don't. The idea is that a symfony application does not usually have it's server configuration in itself, I mean the vhost stuff does not get deployed each time you do push to production so you must have different ServerName in the vhost anyway to support domain.local (it will not go without touching the development server)
The idea is that on my shared hosting I cannot touch the vhost configuration and if I set the SetEnv in my .htaccess file then I will need to be careful not to get this pushed into subversion, then to production, etc. So the minimum all of us do is setup a staging domain, development domain and production domain so I think it is wise to use that to know which environment to load rather than putting extra configurations in the http server. Kupo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
