1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Easy to Manage and Update Static HTML Website Solution

Discussion in 'Programming' started by Mickel Vaessen, Apr 28, 2016.

Thread Status:
Not open for further replies.
  1. #1
    I have a static HTML and CSS website with about 180 pages. All pages have the .html extension.
    Is there a solution to easily manage and update all pages without updating all pages one by one.
    Like adding or deleting things from the head, header, menu, sidebar and footer.
    I used SSI (Server Side Includes) before, but someone attacked my site with Server Side Includes Injections. So now I'm looking for another solution. Is it possible to do this without changing the .html extensions of my website (for backlinks)? Is there another way to easily manage static html sites without changing (converting) to .php or another scripting language?
    I'm using A2 Hosting (TURBO) and their server is apache. I use Notepad++ to create my websites. After the SSI injections problem, I removed all SSI's and now it's a lot of work to update certain parts of my site (head, header, menu, sidebar, footer etc...).
    SEMrush
     
    Mickel Vaessen, Apr 28, 2016 IP
    SEMrush
  2. mmerlinn

    mmerlinn Notable Member

    Messages:
    2,537
    Likes Received:
    476
    Best Answers:
    6
    Trophy Points:
    290
    #2
    Write a program to update all of your pages automatically. Why do it manually? I have over 9000 static webpages that I update with a program that I wrote. I can update all 9000 pages in about 9 hours. Manually it would take at least 2200 hours, or a complete year.
     
    mmerlinn, Apr 30, 2016 IP
  3. Kaas

    Kaas Greenhorn

    Messages:
    36
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    8
    #3
    Yes what he said. You may want to look into shell scripting, easy to learn and very useful for stuff like this.
     
    Kaas, May 13, 2016 IP
  4. NetStar

    NetStar Notable Member

    Messages:
    2,431
    Likes Received:
    525
    Best Answers:
    21
    Trophy Points:
    245
    #4
    Wait a minute.... overtime you created 180+ static HTML files? That means by the 100th static HTML file you began creating you chose to continue this chaos instead of correcting the foreseeable/current issue..... And now that it has become to labor intensive to maintain you want to know if there is an automated solution to bulk edit static files instead of correcting the problem? My advice would be to spend a couple weeks migrating your web site over to a more dynamic solution so you can stop feeding your problem. But based on your history and what you are asking you will most likely refuse to adapt to change and continue doing what you are doing....
     
    NetStar, May 23, 2016 IP
  5. R. Martin

    R. Martin Peon

    Messages:
    20
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    3
    #5
    I think it's much better, easier and simpler way to migrate your entire site to a dynamic solution. It may look difficult to learn scripting and database management, but it worths it. I recommend you to start learning PHP (you can use a framework like CodeIgniter, which is easy to learn), Ruby on Rails, Node.js or any other similar programming language.

    However, in Notepad++ you have an option to search and replace text in multiple files.
     
    R. Martin, May 27, 2016 IP
    Vooler likes this.
  6. Vooler

    Vooler Well-Known Member

    Messages:
    1,138
    Likes Received:
    63
    Best Answers:
    4
    Trophy Points:
    100
    #6
    Dear Mickel

    Problem
    update 180 static html pages' certain areaa either in <head>, sidebar, footer etc; And you need to have a way to do that in bulk without breaking even a single page.

    Solution
    >> What R. Martin said, I do agree but would take longer; besides we can write you small script that migrates from static to wordpress.
    My Solution to your problem
    1. First of all you need to download all pages locally, or zip them on server and keep it, so that if something goes wrong you can revert back from this backup.
    2. Be specific in identification of areas of pages you need to update time to time. Said areas in pages should have almost similar (html or whatever) structure, so that update script can identify them.
    3.1. first script that runs only once, will create area markers; it will mark the areas that need to be updated.
    3.2. 2nd script to verify all pages have areas marked and they contain data, unless all verified it wont let you update
    3.3 3rd and the last script that will update the area in all html pages you want to update.

    Let me know if you do not understand, and kindly tell me what are the exact areas you want to update in files regularly, and provide one sample html file as well.

    Stay well...
     
    Vooler, Jun 26, 2016 IP
  7. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #7
    And since currently it seems to be a fad to make things as complex as possible, here's a way to update HTML files in bulk that somehow is supposed to be easier than just rewriting the damn things using a proper server-language.
     
    PoPSiCLe, Jun 26, 2016 IP
  8. Mickel Vaessen

    Mickel Vaessen Active Member

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    81
    #8
    Thank you all for your answers. I'm sorry, but I forgot about this post. I've already converted my website to PHP a few months ago.
     
    Mickel Vaessen, Sep 28, 2016 IP
Thread Status:
Not open for further replies.