Hello everyone!
I was trying to install Drupal on the free French webhoster free.fr, but had to face some problems with their restrictions on .htaccess files. Not only does it not allow clean URLs with mod_rewrite, but more importantly doesn't it allow the blocking of *.inc files and similar, which is a big problem for security.
Fortunately, many restrictions can be circumvented. There are three principal steps:
First, activate PHP 5. Luckily, this PHP version has register_globals = off. This is done (on free.fr?) like so:
php 1
Second, replace the FilesMatch
with a Files ~
directive (see doc here). Both directives seem to do more or less the same, but only Deny from all
actually blocks access to matched files:
<Files ~ "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
Deny from all
</Files>
Finally, uncomment the mod_rewrite and Apache config stuff. The resulting .htaccess looks like this:
#
# Apache/PHP/Drupal settings:
#
# This enables PHP 5 on free.fr, which has register_globals = off --ingo
php 1
# FilesMatch is deactivated on free.fr --ingo