Overview
I'm currently implementing a multiple environment plug-in for the CodeIgniter framework as a learning experience; however, I have run into an issue which could be solved multiple ways. I am unsure of which approach [is best] to take, hence this question. I've done a quick search of Stack Overflow and the Web on this subject and have found little definitive results.
Problem
When developing a website you generally have a setup which mimics a similar structure to this: Local - Testing - Live. In having this structure you'll almost certainly have a domain structure to be able to view the website in their different environments, whether this be a prefixed structure, or suffixed.
Question
What method of defining a URL for each of the above environments is best practise, is it the prefixed approach:
- local.site.com
- test.site.com
- site.com
or the suffixed approach:
- site.local
- site.test
- site.com
Even if the outcome of this question is that I should provide support for both prefixed and suffixed, it would still be beneficial to know which is the best practise to use.