Allow apache to process existing directories

This commit is contained in:
Dmitriy Simushev 2014-07-14 11:25:06 +00:00
parent 1a60aeac2e
commit 4f49920526
2 changed files with 5 additions and 9 deletions

View File

@ -24,24 +24,20 @@ Options +FollowSymLinks
php_flag session.auto_start off
</IfModule>
# Do not allow apache to automatically add trailing slashes for existing
# directories. They should be processed by the application.
<IfModule mod_dir.c>
DirectorySlash Off
</IfModule>
# Redirect requests to the front controller
<IfModule mod_rewrite.c>
RewriteEngine On
# Use separate front controller for the system installator
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^install(|/(.*))$ install.php [QSA,L]
# Alter only requests for files that do not exist
# Rewrite all other requests for files and directories that do not exist to
# the main front controller
RewriteCond %{REQUEST_FILENAME} !-f
# Rewrite all other requests to front controller
RewriteRule ^(.*)$ app.php [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
# Deny access to internal system files