Question

  • Creator
    Topic
  • #3949049

    updating old .htm files on a server to .html files – simplest method please

    by ccunnington908 ·

    Hi, I’ve inherited an old website, all files on server are .htm. I’ve completed some html courses and have started to update the pages. When I tried to transfer new (.html)files to the server they aren’t replacing the old (.htm) files.
    Is there a method to replace all the files? How does this effect all the hyperlinks?
    I have a window 11 laptop. I’m using Visual studio code .
    Courses used http://www.w3schools.com and HTML 101 Kalob Taulien.
    I have basic knowledge and learning as I go along – or using courses to correct any errors.
    Grateful for any assistance please.

You are posting a reply to: updating old .htm files on a server to .html files – simplest method please

The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our Community FAQs for details. All submitted content is subject to our Terms of Use.

All Answers

  • Author
    Replies
    • #3949052
      Avatar photo

      Reply To: updating old .htm files on a server to .html files – simplest method please

      by rproffitt ·

      In reply to updating old .htm files on a server to .html files – simplest method please

      1. Browsers CACHE pages so to the new web master they often make this complaint until they learn how to purge the web browser cache.

      Sometimes there’s a fast way but hey, read a few prior discussions at https://www.google.com/search?q=force+chrome+to+reload+page+without+cache+site:superuser.com

      2. Now about HTM and HTML files. Let’s say I have two files called thing1.htm and thing1.html. That would be 2 files and not one. If your old server calls up htm then all is proper and good if the copied in html file does not change the web site. Can you think this through?

      • This reply was modified 2 years, 4 months ago by Avatar photorproffitt.
      • This reply was modified 2 years, 4 months ago by Avatar photorproffitt.
    • #3949057
      Avatar photo

      Easiest method I can think of

      by Wizard57M-TR ·

      In reply to updating old .htm files on a server to .html files – simplest method please

      is first copying each htm file to the same name html file,
      like this from command line:
      copy index.htm index.html
      (this way you have a backup if things go haywire!)
      Then you can use a text editor such as Notepad to edit each html file, use “search and replace” any instances of links to just htm to link to the new html copies.
      Then just be sure any server is serving the proper html file and not the htm.
      Alternatively, you might could just find a batch rename tool and rename any htm files as html. All you are really doing is just changing the file extension, the contents will remain, and then you edit each html file as outlined above.
      Wiz

    • #3949093
      Avatar photo

      Reply To: updating old .htm files on a server to .html files – simplest method please

      by kees_b ·

      In reply to updating old .htm files on a server to .html files – simplest method please

      The simplest method is to give your new pages the same name as the old page it replaces. Then, when copying it to the server, it overwrites the old file.

      If old content and new content don’t coexist and cooperate, you have to build a whole new site (either on your own local server, a subdomain of the current domain or a new domain) and switch the whole site only when the new one is finished.

      • This reply was modified 2 years, 4 months ago by Avatar photokees_b.
      • This reply was modified 2 years, 4 months ago by Avatar photokees_b.
Viewing 2 reply threads