====== Hints ====== ===== PHP Includes ===== Some people include files like include('http://otherdomain/1.html'); or virtual('/scj/top/top.html'); or readfile('http://domsin/1.html') moreover they use it may times per page. You should NOT use it. **Why:** PHP creates page BEFORE user gets it. So if you have something like include('http://otherdomain/1.html') PHP has to load that page each time user load a page with that include. There 2 downsides of this approach: * PHP create a regular connection to that host requesting a page. If you have 10 such includes - 1 request to such page generates 10 subrequests loading server. * If for some reason PHP won't be able to connect to that domain and load that page - it will wait and first page won't be loaded until PHP gets that include. So if that otherdomain is down - first domain will be virtually down too. **What to do:** Use only local includes. Ie virtual('/scj/top/top.html') should be include('/home/user/domain/scj/top/top.html'); if file is located at another server - ask admin to setup rsync or copy file using crontab and so on. **Including local script with parameters** Let's say you have include like so you have some parameters here. You can pass it as ===== Close site for some countries ===== Example for .htaccess RewriteEngine on RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(RU|CN)$ [NC] RewriteRule ^$ http://google.com [R,L]