jdMorgan - 5:02 pm on Jul 23, 2010 (gmt 0)
You could use the "auto-prepend" feature of PHP to include the code in every page.
If you do use a redirect, then specify a 301 redirect or a 302 redirect as desired. A 301 will tell search engines to update the URL in their search results, whereas a 302 will keep the original URL, but use and show the content from the new URL.
However, if you do not wish to expose the "country-based" subdirectory to users and search engines at all, then you should not use a redirect, but rather use an internal rewrite (e.g. Apache mod_rewrite URL-to-filepath translation). Alternatively, your script should "open and read in" (PHP file include) the correct "country-based" files, and output their content to the browser directly without changing the URL.
Keep URLs and filepaths separate in your head -- They are not at all the same thing, and understanding the difference makes these kinds of projects much easier to understand. Mod_rewrite can change the file associated with a URL.