I'm completely new to the concept of using the rewrite engine to change URLs, but have a site where I want URLs looking like www.mysite.com/about to go to www.mysite.com/index.cfm?page=about. I added an .htaccess file with the code below and everything was grand.
The problem, I just realized, is that the site also has an administration subdirectory at www.mysite.com/admin. If you try to access www.mysite.com/admin/index.cfm it works fine, but www.mysite.com/admin alone obviously gets redirected.
Is there a way to either 1) specify that redirects should only work for files in the root directory or 2) redirect everything unless the URL contains /admin?
RewriteRule ^([^/\.]+)/?$ index.cfm?page=$1 [NC]