This website is now static html, I have no time to write anything and Wordpress has more security holes than a Swiss cheese, and so the migthy wget -m replaced the ugly php. For sure there will be problems with this new version, but that is life.
show hide sidebar
Some advices, read carefully:
Se vuoi essere alla moda ed avere un blog tutto tuo mi permetto di consigliarti dreamhost, se usi il codice DAT hai pure lo sconto (dettagli).

Archive for the ‘inglese’ Category

Drupal, hide install text files using rewrite rules

Tuesday, January 30th, 2007

I see lots of web sites that are using drupal cms, and most of them are not hiding the text files that the installation process leave in the root directory. This is not a problem in general, but if you use an old version of drupal maybe is better not to show the world the version you are using. Take a look at drupal.org changelog file (yes this site is supposed to be up of date;).

So I use this basic solution, note that I update drupal using cvs method so I hide also the CVS directories. Put this code in your .htaccess file after RewriteEngine on inside the IfModule mod_rewrite.c section:

RewriteRule ^(.*)CHANGELOG\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)INSTALL\.mysql\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)INSTALL\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)MAINTAINERS\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)CVS$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)CVS/$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)INSTALL\.pgsql\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)LICENSE\.txt$ http://www.perdomani.net [R,L]
RewriteRule ^(.*)UPGRADE\.txt$ http://www.perdomani.net [R,L]

Modify to fix your needs and save the .htaccess file.

F.A.Q.

1 – Why you use tons of rules for every file and not something like ^(.*)\.txt$ ?

Mhh, I really don’t remember, maybe I have some text file I want to be accessible in the site.

2 – Why not just removing that text files?

I think that CVS import them on every update, so you have to remove the files many times.

-
buy buy buy buy