having fun

Apache2 /icons/ directory forbidden

Default installations of Apache usually alias /icons to Apache’s icons directory which cannot be overridden in an .htaccess file. If you do not control the Apache configuration of a server, and for maximum compatibility, it is always best to never have an /icons directory at a website’s root level.

On a Debian, for example, the following is defined at /etc/apache2/mods-available/alias.conf:

Alias /icons/ "/usr/share/apache2/icons/"

and at some other versions this alias is defined in httpd.conf

If you control the server you could easily enough disable this alias, or change it to something else. The alias directive cannot be changed in a .htaccess file so if you do not control the server you will not be able to change it.

Однако, используя .htaccess, можно поменять иконки и поведение FancyIndexing: http://httpd.apache.org/docs/2.4/mod/mod_autoindex.html; доступны такие инструменты, как шаблоны header и footer, SSI, при наличии фантазии FancyIndex можно изменить до неузнаваемости! Примеры:





Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

Test your skill: *