16
我想知道如果將.htaccess文件內容移動到apache2的虛擬主機文件中,性能是否會增加?將.htaccess內容移到虛擬主機中,以獲得性能
這是我的.htaccess
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_NAME} ^([^.]+\.[^.]+)$ [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
如果這樣做是一個好主意,其中虛擬主機聲明我應該將上述內容的內容?
謝謝!