I have a quick question about .htaccess. Why does my site load faster when using this URL:
http://www.phaidi.com/network/index.php?p=home&s=chaumyvn
Than by going straight to the chaumy.vn domain?
I think it has something to do with my .htaccess, but I have not been able to fix it. See my .开发者_如何学Chtaccess file below:
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
ReWriteCond %{HTTP_HOST} chaumy.vn
ReWriteCond %{REQUEST_URI} !network/
ReWriteRule ^(.*)$ /network/index.php?p=$1&s=chaumyvn [R=301]
<Files .htaccess>
order allow,deny
deny from all
</Files>
Any ideas?
I don't know if this will fix all the slowness, but a quick remark.
You are only excluding the network folder from the rewrite rule, however what about your static files (/css/, favicon etc.) They will all be rewriting to your network/index.php file as well.
Besides that for production environments (especially on high-traffic websites) I've heard it's better to put the 'htaccess' information straight into the apache/virtualhost configuration, as it saves Apache from having to scan for the htaccess and parse is for every request. But it shouldn't save 'that much' in this situation.
精彩评论