F
F
frostic2019-03-08 15:05:23
OctoberCMS
frostic, 2019-03-08 15:05:23

How to make suffix .html instead of .htm by default?

It is very necessary that in a new project on OctoberCMS all URLs end in .html and not .htm
When you try to create a page with such an extension in the admin panel, Oktober swears.
Is it possible to solve this so that all new urls are created with such a suffix It's a
long time to explain why this is needed, but it's true. Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Lovtsevich, 2019-03-18
@lautsevich

Add the following rules to .htaccess if Apache web server (mod_rewrite module must be installed and enabled):

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.htm$ $1.html [R=permanent]

This will rewrite all URLs to the format you need without changing anything in the October CMS itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question