Agreed. the simplest solution is the relative path approach. But I am a big fan of CodeIgniter so anytime I can throw in a plug, I do. ;) kah
On Wed, Aug 26, 2009 at 12:57 PM, Doug Boude <[email protected]> wrote: > I have a feeling that using a framework as an example of how to manage > environments is probably way more complicated than the original poster > wanted to delve into, but just to add to Keith's input, codeigniter is a PHP > framework used to help more advanced developers keep their code organized > and separated. Built in to it is the ability for the developer to define > different environments, such as "development", "QA", "Production", and > unique URLs that point to each. ColdFusion (yet another awesome web > development language) has similar frameworks that do the same thing (such as > ColdBox, ModelGlue, etc.), as I'm sure probably also exists for .Net as > well. > Sticking to just simple answers though, I concur that creating relative > URLs (leaving off the 'http://www.bla.bla...) as opposed to specific URLs > (full paths WITH the http://www.bla.bla...) is key to making a site work > whereEVER it happens to be living at the moment. If there is no need to > allow other people to play with the site while it's still in development, > then by all means set up a local development environment on your own PC (web > server, editing your hosts file, setting up virtual hosts) is the ideal way > to go. If you DO have to allow other people to access it, one will have to > go with a slightly more complex solution that involves setting up > subdomains, some kind of coded security (looking at referring IPs, requiring > authentication, etc.), and/or utilizing the htaccess file (IF you're using > Apache as your web server AND you're not on a shared host that doesn't allow > you to touch such things). > > Maybe if the original poster could provide a little more detail about your > own work environment (scripting languages, if any, being used, frameworks > being used, hosting options, what the need is regarding external > interaction, what the exact goals are regarding access (trying to keep the > spiders from crawling it, trying to keep unauthorized people out, etc.), > that would probably prompt some more specifically useful answers for ya. :) > > Doug Boude :0) > > On Wed, Aug 26, 2009 at 10:56 AM, Keith Aric Hall <[email protected]>wrote: > >> If you are using something like codeigniter (http://codeigniter.com) this >> is done easily. There is a config in which you define the root/site url. But >> of course you could hand roll your own as well. >> >> On Wed, Aug 26, 2009 at 10:51 AM, Trevor Rosen <[email protected]>wrote: >> >>> >>> Make all your links relative to the root. And then change what the >>> root is. >>> >>> How do you do that? Apache config -- especially vhosts (virtual hosts) >>> >>> You'll want to mess with these two directives as appropriate: >>> >>> - DocumentRoot: A virtual host will let you set up >>> "staging.foocompany.com" to point to wherever folder on the server you >>> want via the DocumentRoot directive -- the DocumentRoot's job is to >>> say where on the machine your site's code lives. >>> >>> - ServerName: says what the server name is (what you'd put in the URL >>> bar of a browser to get there) >>> >>> For go-live, you could change either of these in the appropriate vhost >>> block to go from staging to live (assuming the DNS already points to >>> that server). After that, just restart Apache and you're done. >>> >>> You might be on shared hosting. If so, you can usually find a GUI- >>> based option to manipulate this stuff. And the DNS stuff should >>> already be handled for you, since you're making subs of an existing >>> domain. You can easily learn more about Apache if you have a Mac -- >>> it powers web serving in OS X. >>> >>> best of luck, >>> >>> -TR >>> >>> On Aug 26, 2009, at 10:33 AM, Oliviaiam wrote: >>> >>> > >>> > Does anyone have an answer to this probably simplistic question?... >>> > How do you create a site so that it's non-public facing while you >>> > develop it and then easily converted to the correct domain? By that, >>> > I mean converting from the non-public URL to the public one without >>> > having to change every single internal link? ---Thanks >>> > >>> > >>> > > >>> >>> ServerName: says what the server name is (what you'd put in the URL >>> bar of a browser to get there) >>> >>> For go-live, you could change either of these in the appropriate vhost >>> block to go from staging to live (assuming the DNS already points to >>> that server). >>> >>> On shared hosting situations, you can usually find a GUI-based option >>> to manipulate this stuff. And the DNS stuff should already be handled >>> for you, since you're making subs of an existing domain. >>> >>> On OS X, >>> >>> best of luck, >>> >>> -TR >>> >>> Make all your links relative to the root, >>> On Aug 26, 2009, at 10:33 AM, Oliviaiam wrote: >>> >>> > >>> > Does anyone have an answer to this probably simplistic question?... >>> > How do you create a site so that it's non-public facing while you >>> > develop it and then easily converted to the correct domain? By that, >>> > I mean converting from the non-public URL to the public one without >>> > having to change every single internal link? ---Thanks >>> > >>> > >>> > > >>> >>> >>> >>> >> >> >> -- >> Keith Aric Hall >> >> http://www.keitharichall.com/ >> twitter: keitharichall >> >> >> >> >> > > --~--~---------~--~----~------------~-------~--~----~ > Our Web site: http://www.RefreshAustin.org/ > > You received this message because you are subscribed to the Google Groups > "Refresh Austin" group. > > [ Posting ] > To post to this group, send email to [email protected] > Job-related postings should follow http://tr.im/refreshaustinjobspolicy > We do not accept job posts from recruiters. > > [ Unsubscribe ] > To unsubscribe from this group, send email to > [email protected] > > [ More Info ] > For more options, visit this group at > http://groups.google.com/group/Refresh-Austin > -~----------~----~----~----~------~----~------~--~--- > > -- Keith Aric Hall http://www.keitharichall.com/ twitter: keitharichall --~--~---------~--~----~------------~-------~--~----~ Our Web site: http://www.RefreshAustin.org/ You received this message because you are subscribed to the Google Groups "Refresh Austin" group. [ Posting ] To post to this group, send email to [email protected] Job-related postings should follow http://tr.im/refreshaustinjobspolicy We do not accept job posts from recruiters. [ Unsubscribe ] To unsubscribe from this group, send email to [email protected] [ More Info ] For more options, visit this group at http://groups.google.com/group/Refresh-Austin -~----------~----~----~----~------~----~------~--~---
