Options +FollowSymlinks #requirephp 52 AddHandler application/x-httpd-php52 .php RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteRule ^js(-[0-9]+)?\/ckeditor\/config\.js$ js/ckconfig.js [L] # fck -> ck editor rewrite RewriteRule ^userfiles/fck/image/(.+)$ userfiles/ckfiles/images/$1 [L] RewriteRule ^userfiles/fck/file/(.+)$ userfiles/ckfiles/files/$1 [L] RewriteRule ^userfiles/fck/media/(.+)$ userfiles/ckfiles/media/$1 [L] # captcha's referrer check RewriteCond %{HTTP_REFERER} ^$ RewriteCond %{HTTP_HOST}@@%{HTTP_REFERER} !^([^@]*)@@https?://\1/.* RewriteRule images/captcha/.*\.png - [NC,F] 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