Options +FollowSymlinks RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # captcha's referrer check RewriteCond %{HTTP_REFERER} ^$ RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} !^([^@]*)@@https?://\1/.* RewriteRule images/captcha/.*\.png - [NC,F] RewriteRule ^js\/fckeditor\/fckconfig\.js$ js/fckconfig.js [L] RewriteRule ^js\/fckeditor\/fckconfig-flash\.js$ js/fckconfig-flash.js [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.*)\.merge\.(css|js)$ _lib/merge.php?file=$1.merge.$2 [L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.*)$ index.php [QSA] DirectoryIndex index.php