So as with almost everything in EE, there are lots of ways to do this. Here are a few options, roughly sorted by ease of implementation. What's right for you will depend on the complexity of your particular build and your comfort level:
Personally I'd avoid using .htaccess for this kind of static routing, although it will probably work fine it takes routing out of your app and puts it in your server config, which always seems wrong to me when there are native options available.
- If your foo template is in your site's default template group, and you have "strict URLs" set to off in your global template prefs, your foo template should automatically be available at /foo
- Use the pages module, creating an entry with a URL of /foo that uses that template.
- Use an addon like structure, NavEE to manage your navigation/URL structure
use a "controller" template as your site's index template, that inspects the URL and routes various values to different template via embeds:
...
{if segment_1 == "foo"}
{embed="pages/foo"}
{/if}
...
Use Freeway to give you full routing control independent of templating
If you're starting out with EE and/or only need to do this for a few pages, I'd suggest using the pages module in the first instance, as its free, bundled with EE and requires minimal config in order to set up.
If you have a large site or a more complex URL structure with lots of nested/child pages Structure/NavEE are great choices and similarly easy to set up.