Page 1 of 1

pages with .htm extension

Posted: Fri Sep 09, 2011 6:20 pm
by Jesse
I am following the recomendation for adding a .htm extension found here:
http://wiki.cmsmadesimple.org/index.php ... And_Tricks

specifically the use of:
RewriteRule ^(.+).htm$ index.php?page=$1 [QSA]

I find that it does allow pages to be accessed with a .htm extension, however it also breaks all navigation on the site because the links on the site cannot have a .htm extension. Any attempt to name pages that way in the cms gets changed to -htm.

Has anyone come up with a way to have a site where all of the pages end in .htm? or better yet is there a way to add it to specific pages only?

Re: pages with .htm extension

Posted: Fri Sep 09, 2011 6:30 pm
by RonnyK
I would rather use the default htaccess.txt file which is located in the /docs folder and use that as the .htaccess for the root. Then in the config.php change the page_extension to .htm

Ronny

Re: pages with .htm extension

Posted: Mon Sep 12, 2011 1:52 pm
by Jesse
Thank you Ronny. That works, using $config['page_extension'] = '.htm'; Is there any way to set an extension to be used only on certain pages?
In going from static to CMS, we are trying to match the urls on our pages that have incoming links from other sites. A few of them have ".html instead of ".htm".
Many pages have no exterior links, and we could safely remove any extension.