<IfModule mod_rewrite.c>


    RewriteEngine On


	RedirectMatch 403 ^/.+\.(inc)$


    RewriteCond %{REQUEST_URI} !\.(?:|metronic|public|assets|img|css|json|js|jpe?g|gif|png|ttf|woff|woff2|svg|map|ico|robots)$ [NC]


	<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font|font.css|css|js)$">


		<IfModule mod_headers.c>


			Header Set Access-Control-Allow-Origin "*"


			Header set Access-Control-Allow-Credentials true


		</IfModule>


	</FilesMatch>





	RewriteCond %{REQUEST_URI} ^(.*)?img(.*)$


	RewriteRule ^img/(.*)$ /index.php/$0 [PT,L]





	RewriteCond %{REQUEST_URI} !\.(?:|metronic|public|assets|img|css|js|jpe?g|gif|png|ttf|woff|woff2|svg|map|ico|robots)$ [NC]


	RewriteCond %{REQUEST_URI} ^(.*)?admin(.*)$


    #Restrict admin folder


	#RewriteCond %{REMOTE_ADDR} !^212\.83\.148\.0$


	#RewriteRule ^(.*)$ – [R=403,L]


	RewriteRule ^admin/(.*)$ /index.php/$0 [PT,L]





	##First rewrite any request to the wrong domain to use the correct one (here www.)


    #RewriteCond %{HTTP_HOST} !^www\. [NC]


    #RewriteCond %{HTTPS} off


    #RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


    #DEVELOPER


    #RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]





	RewriteCond %{REQUEST_FILENAME} !-f


	RewriteCond %{REQUEST_FILENAME} !-d


    RewriteRule .* index.php/$0 [PT,L]


</IfModule>


<IfModule !mod_rewrite.c>


    # Without mod_rewrite, route 404's to the front controller


    ErrorDocument 404 /index.php


</IfModule>


<IfModule mod_deflate.c>


	SetOutputFilter DEFLATE


	BrowserMatch ^Mozilla/4 gzip-only-text/html


	BrowserMatch ^Mozilla/4\.0[678] no-gzip


	BrowserMatch \bMSIE !no-gzip !gzip-only-text/html


	# Don't compress images


	SetEnvIfNoCase Request_URI \


	\.(?:gif|jpeg|jpg|png)$ no-gzip dont-vary


	# Make sure proxies don't deliver the wrong content


	ExpiresByType image/png "access 1 day"


	ExpiresByType text/javascript "access 1 day"


	ExpiresByType text/css "access 1 day"


</IfModule>