views:

88

answers:

1

Hi,

I googled this many times but now I have to ask it here.

I want to make a workflow for a website for Developpement/Production.

My constraint is that I use Facebook Connect (Facebook Graph now) so I need to have the dev and prod on the same domain and server. (to be able to log in and test the features)

I thought I will edit the CodeIgniter Index.php to redirect if I have a specific user agent (I can edit the one of my firefox)

You think it's a good Idea or you have a better one ?

And now comes the eternal question : how can I deploy this the easy way ?

should I use Capistrano or Phing ? or simply a script with SVN ?

Please help me, I'm totally new to this Deployment thing. I used to work directly in production for my little websites or on other domains. but now it's not possible anymore.

+1  A: 

For me, I'll have something like two application folders. One called "production", one called "development". Then in your index.php file, where you set your application folder, you can use php to determine which one to use for whatever reason. Just set your $application_folder variable to whichever one you need. (You could do this based on anything. A cookie, IP address or something.)

Matthew
Note that the user guide talks about this in detail here: http://codeigniter.com/user_guide/general/managing_apps.html
Kurucu
I did this, I changed my index.php to match with a cookie. and in a case redirects to one application folder, and in the other case another folder.
Onigoetz