file.shtml. But this will mean that bookmarks (and more importantly, search engine rankings) will break. How can I avoid this problem?
In the above example, you only need to provide the RewriteBase if your .htaccess file is in a sub-folder to your main site root folder. For example, if your main web site (http://www.domain.com) is contained in a folder on your server, and your .htaccess file is also directly inside this folder, you won't need it. But if you are enabling this trick for only one folder within your site, for example, in "http://www.domain.com/myfolder/", you will need to set the RewriteBase to "/myfolder/", and put the .htaccess file within that folder.
RewriteRule ^(.*)(.html)$ $1.shtml [L,R,PERMANENT]
24th of November, 2008