在apache中关闭htaccess的覆盖是否会提高性能?我在网上看了一下,关于此的文章/报道非常少.
如果是这种情况,我该怎么办呢?我会在默认的虚拟主机文件中执行此操作吗?
一个例子是:
OpenCart附带2个主要用于mod_rewrite的htaccess文件,如果我将其移动到< Directory>这会有所作为吗?
<VirtualHost *:80> ServerAdmin www@shop.co.uk ServerName shop.co.uk ServerAlias www.shop.co.uk DocumentRoot /var/www/shop/public <Directory /var/www/shop/public> Options +FollowSymlinks # Prevent Direct Access to files <FilesMatch "\.(tpl|ini|log)"> Order deny,allow Deny from all </FilesMatch> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^?]*) index.PHP?_route_=$1 [L,QSA] </Directory> <Directory /var/www/shop/public/admin/view/javascript/ckeditor> AddType application/x-javascript .js AddType text/css .css # If PHP is mapped to handle XML files,you could have some issues. The following will disable it. AddType text/xml .xml </Directory> ErrorLog /var/log/apache2/shop-error.log LogLevel warn CustomLog /var/log/apache2/shop-access.log combined </VirtualHost>