Quantcast
Channel: rejon is Jon Phillips. » cantocore
Viewing all articles
Browse latest Browse all 10

Make Static: Archiving, Accelerating and Securing Websites, or Converting Dynamic Sites to Static Pages

$
0
0

Weezy DiVX Melting First Rejon Fan Art @liltunechi, we'll call it weezy compression
[ Ok, don't compress images that much...you get the point, right? ]

Its silly to keep a content management system running if its not being used and there instances where clients want a purely statically generated website for SEO and to calm security-paranoid nerves. I started thinking about this more and have been reading a few links. It brought me back to the days of using the old BLD software that Brian McKeever wrote and I ported to work on Linux. I then started journeying down the path of picking static file generator softwares, but honestly its silly IMO to learn yet another markup language, when Fabricatorz are promoting our platform Aiki Framework. In fact, with running a simple wget command, one could build an entire site in a dynamic content management system or framework, and then simply use wget to generate static files to be served.

There are some considerations though before you do this such as:

  • turning off login/registration systems
  • turn off commenting systems
  • making sure that you are not locking yourself out of your house, so to speak, with a robots.txt blocking bots, and the ethical software, wget, which has respect for robots.txt built into it by default.

So, after you fix these up on your dynamic site, this example is the best for converting a site I’ve found:

wget -r -p -k -E -nH -P /srv/www/dev.cantocore.com/public/test cantocore.com

Here it is laid out:

wget -r -p -k -E -nH -P LOCAL_PATH_TO_SAVE_TO SITE_TO_CONVERT

This makes a fully static copy of the cantocore.com site to dev.cantocore.com!

Then, I had to make this addition to .htaccess to make sure that some urls were good for SEO blah:

RewriteEngine On
RewriteRule ^(.*)\.1\.html$ $1

That should do you pretty good! Let me know if there are any comments on this!

I learned this from mossiso, stackoverflow question, Matt Wynne, and idlewords.com.

The improvements I see that could be made include the htaccess rules and possibly even a way to compress the pages even further with html tidy or some whitespace stripping commands. What programs from the commandline could be useful to further make this a nice option for both archiving and serving fast static pages?


Viewing all articles
Browse latest Browse all 10

Latest Images

Trending Articles





Latest Images