Make a website more hard to viruses and hacks

Make a website more hard to viruses and hacks

So, if a website's index file is index.php then it can be targeted to be rewritten with a code to redirect the traffic to a needed resource - another website (example affiliate page, ..). Targeted - meaning hacked or virused but do not get afraid of this and continue reading to find the ways out of how to protect your CMS.

What if we change the default index file name to something custom?
The common error in that case could be that instead of the website content the domain may load just a list of the files. Terrible?! But let's get it sorted:

It's bcause the default web server's (Apache, Nginx) file is index.html and index.php if a PHP is used. And it's used indeed if a cms like MODX or WordPress is installed.

A solution for this can be a modification of the .htaccess (an example is listed in the hosting part of the Blog section ) file from something like:
DirectoryIndex index.html index.php
to
DirectoryIndex youCustomIndex.php

Having this implemented your website is not depending on the default directory index file. That's already something but the friendly urls may stop working (see how important it is to have the friendly urls working on a web site) and it's because the default .htaccess provided out of a CMS box might have references to index.php
In this case this needs to be rewritten to have the references to only your custom directory index file. In this example it's youCustomIndex.php file.

Why this instruction can be trusted? For example the x-cart e-com engine has it like this for a long time and it has proved as a really stable solution.

Thus, the above idea is not really new and is already commonly used and might be taken into consideration if not yet used with your MODX or other CMS powered website like Wordpress.



Rate this information:
  • Currently0/5 Stars
  • 1
  • 2
  • 3
  • 4
  • 5
Votes: 0

May we recommend:
Build you own product and order in opencart  Photo galleries  SQL data import to MODX Revo resources  Warehouse pick-n-pack software  

MODX CMS extensions Sale:

6h support  build your product in opencart  import products into opencart  opencart installation with vqmod  


Modx Extras for advanced content