htaccess

Viames Marino edited this page May 23, 2018 · 8 revisions

The .htaccess file is used to configure Apache for the Pair routing system. Its content is as follows.

RewriteEngine On
Options +FollowSymLinks -Indexes
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) index.php
<FilesMatch "\.(php|xml|ini)">
  Order Deny,Allow
  Deny from all
</FilesMatch>
<Files index.php>
  Order Allow,Deny
  Allow from all
</Files>

The rules just mentioned are used to deny direct access to php files, ini and xml, which could give valuable clues to those who maliciously want to explore the web project. Depending on the configuration and permissions of the web server on which the project is running, it may be necessary to modify or comment the second line of the .htaccess file.

# modified
Options -FollowSymLinks -Indexes
# disabled
# Options +FollowSymLinks -Indexes

In fact, if the configuration of the server is denied the possibility of modifying one or both of these attributes, an Apache blocking error will be generated when the project is launched.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.