pages with .htm extension

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Jesse
Forum Members
Forum Members
Posts: 29
Joined: Fri Jan 07, 2011 8:56 pm

pages with .htm extension

Post 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?
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: pages with .htm extension

Post 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
Jesse
Forum Members
Forum Members
Posts: 29
Joined: Fri Jan 07, 2011 8:56 pm

Re: pages with .htm extension

Post 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.
Post Reply

Return to “CMSMS Core”