If i set DirectorySlash Off
in my .htaccess
file and call the directory without the trailing slash i get an 403-Forbidden
from my server. If i call it with slash everything works fine.
Could anyone explain why? Here are my fully anonymized .htaccess
:
# GLOBAL CONFIG
Options +FollowSymlinks
DirectorySlash Off
AddDefaultCharset utf-8
php_value post_max_size 256M
php_value upload_max_filesize 256M
# BEGIN WordPress
RewriteEngine On
RewriteBase /folder/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /folder/index.php [L]
# END WordPress
# REMOVE WWW
RewriteCond %{HTTP_HOST} ^([^.]+).domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com$1 [R=301,L]
See Question&Answers more detail:os