Options -Indexes

ErrorDocument 404 /404.php
ErrorDocument 403 /404.php

<IfModule mod_rewrite.c>

	RewriteEngine On
        RewriteBase /

#Remove extra trailing slashes
RewriteCond %{REQUEST_URI} ^(.*)/{2,}(.*)$
RewriteRule . %1/%2 [R=301,L]

#Add missing trailing slash
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]

RewriteRule /(uploads/.*) $1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ content.php?url=$1 [QSA,L]
</IfModule>

<ifModule mod_deflate.c>
	<filesmatch "\.(js|css|html|jpg|png|gif|eot|woff|ttf|svg)$">
		SetOutputFilter DEFLATE
	</filesmatch>
</ifModule>

<FilesMatch "\.(htaccess|htpasswd|ini|log|sh|inc|bak|cache|tpl)$">
	Order Allow,Deny
	Deny from all
</FilesMatch>