I am trying to configure my site with an htaccess file so that any request ending in .html will be rewritten so that the new URL is identical except that ".html" is not present at the end. This should work regardless of how many directories deep the request might be.
So for example, http://site.com/page1.html -> http://site.com/page1
http://site.com/dir1/dir2/page2.html -> http://site.com/dir1/dir2/page2
http://site.com/~bob/dir3/page3.html -> http://site.com/~bob/dir3/page3
I would prefer a solution where I don't need to hardcode the domain name, but it would be acceptable if necessary.
My current .htaccess file is a standard Zend Framework .htaccess file, and it is working correctly. I am aware that I will need to change the rewrite base if I move the site elsewhere.
SetEnv APPLICATION_ENV development RewriteEngine On #Send all requests for non-existant files to index.php RewriteBase /~rburk/refactor RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L]