I want pages in my website to be seen embedded in a shell page. If a file URL is entered I want it redirected as shown below;

http://www.mywebsite.com/pages/2009/somefile.htm

or http://www.mywebsite.com/pages/somefile.htm

should be redirected in .htaccess to;

http://www.mywebsite.com?id=pages/2009/somefile.htm

or likewise to http://www.mywebsite.com?id=pages/somefile.htm

OK to have http://www.mywebsite.com/?id=pages/blah-blah.htm a slash after the .com/

Not sure how to do that. .htaccess not exactly my cup of tea.