Skip to content

Instantly share code, notes, and snippets.

@merkuriy
Last active August 29, 2015 14:07
Show Gist options
  • Save merkuriy/2b4721f2ca303c853f8f to your computer and use it in GitHub Desktop.
Save merkuriy/2b4721f2ca303c853f8f to your computer and use it in GitHub Desktop.
htaccess-tilla-cms-apache-2.4
RewriteEngine On
Options +FollowSymLinks
RewriteEngine On
<IfModule mod_charset.c>
CharsetRecodeMultipartForms off
</IfModule>
<IfModule mod_php5.c>
php_value register_globals off
</IfModule>
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^panel/(.+)$ core/admin.php?module=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^panel(/)?$ core/admin.php?module=structure [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^api\..+ core/api.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/panel
RewriteRule .* core/view.php [L,QSA]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment