Change File Extension

Does anyone know how to change the file extension from .html to .htm?



We’ve used .htm for 15 years and each upgrade I need to change the code somewhere to get the extension changed from the default .html to what we use .htm.



I did put in a help ticket but the reply said they were loaded heavily and would be a couple days before an answer.



If someone knows what needs to be changed, I’d appreciate it.



Thanks,

Steve

[quote name='TBOTECH' timestamp='1426698165' post='208289']

Does anyone know how to change the file extension from .html to .htm?



We've used .htm for 15 years and each upgrade I need to change the code somewhere to get the extension changed from the default .html to what we use .htm.



I did put in a help ticket but the reply said they were loaded heavily and would be a couple days before an answer.



If someone knows what needs to be changed, I'd appreciate it.



Thanks,

Steve

[/quote]



Have a look at the SEO addon

It's not in the SEO addon. That only has with an extension (.html) or not with one. I should add that I'm using V4.2.4.



I've had to do this for every upgrade over the years, Usually just an edit in the code somewhere and support usually tells me what I need to change. But I'm about ready to live with my upgrade and need to make the change as soon as possible.

Why you cannot contact support team now?

Got it working. Here is the answer I was given in case anyone else needs it:



In order to implement this feature, an additional code modification is required to be made. I assume the .html format SEO names is already used for the objects in your store. Please take these steps:


  1. Open the app/addons/seo/init.php file of your installation.
  2. Replace this line:

    fn_define('SEO_FILENAME_EXTENSION', '.html');



    with this one:

    fn_define('SEO_FILENAME_EXTENSION', '.htm');



    Save the file.


  3. Clear the cache by renaming the var/cache directory.



    I should inform you that the CS-Cart software was not tested when the .htm extension is used, because the .html extension is the most preferable one, so that is why I cannot guarantee you the stable operation of your store with this modification.



    However, you can apply it, check your store and if everything is working correctly on your site with this extension, you can use this modification.

well done, that is exactly how it should work!



Also it is not advised to make it empty because SEO module might stop working:

[color=#282828][font=arial, verdana, tahoma, sans-serif]fn_define('SEO_FILENAME_EXTENSION', '');[/font][/color]

p.s. it is in case when some store owners want to get rid of “.html” extension for all SEO URLs

[quote name='TBOTECH' timestamp='1426767248' post='208384']

Got it working. Here is the answer I was given in case anyone else needs it:



In order to implement this feature, an additional code modification is required to be made. I assume the .html format SEO names is already used for the objects in your store. Please take these steps:


  1. Open the app/addons/seo/init.php file of your installation.
  2. Replace this line:

    fn_define('SEO_FILENAME_EXTENSION', '.html');



    with this one:

    fn_define('SEO_FILENAME_EXTENSION', '.htm');



    Save the file.


  3. Clear the cache by renaming the var/cache directory.



    I should inform you that the CS-Cart software was not tested when the .htm extension is used, because the .html extension is the most preferable one, so that is why I cannot guarantee you the stable operation of your store with this modification.



    However, you can apply it, check your store and if everything is working correctly on your site with this extension, you can use this modification.

    [/quote]



    Thank you for sharing this information