LafoMamone/Katana/master/default.htaccess - Htaccess File

LafoMamone/Katana/master/default.htaccess

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On

  ########## Begin - Rewrite rules to block out some common exploits
  ## If you experience problems on your site block out the operations listed below
  ## This attempts to block the most common type of exploit `attempts` to Joomla!
  #
  ## Deny access to extension xml files (uncomment out to activate)
  #<Files ~ ".xml$">
  #Order allow,deny
  #Deny from all
  #Satisfy all
  #</Files>
  ## End of deny access to extension xml files
  RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [OR]
  # Block out any script trying to base64_encode crap to send via URL
  RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
  # Block out any script that includes a <script> tag in URL
  RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
  # Block out any script trying to set a PHP GLOBALS variable via URL
  RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
  # Block out any script trying to modify a _REQUEST variable via URL
  RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
  # Send all blocked request to homepage with 403 Forbidden error!
  RewriteRule ^(.*)$ index.php [F,L]
  #
  ########## End - Rewrite rules to block out some common exploits

  RewriteBase /
  
  #RewriteCond %{HTTP_HOST} !^autos.ba$ [NC]
  #RewriteRule ^(.*)$ http://autos.ba/$1 [L,R=301]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  #RewriteRule ^(.*)$ index.php/$1 [L]
  
  RewriteRule ^m/([0-9]+)/p/([0-9]+)(.*)$ index.php?m=$1&p=$2%{QUERY_STRING} [L]
  RewriteRule ^m/([0-9]+)(.*)$ index.php?m=$1&%{QUERY_STRING} [L]
  RewriteRule ^c/([0-9]+)(.*)$ index.php?c=$1&%{QUERY_STRING} [L]
  RewriteRule ^s/([0-9]+)(.*)$ index.php?s=$1&%{QUERY_STRING} [L]
  RewriteRule ^p/([0-9]+)(.*)$ index.php?p=$1&%{QUERY_STRING} [L]
  RewriteRule ^ship/([0-9]+)(.*)$ index.php?ship=$1&%{QUERY_STRING} [L]
  RewriteRule ^ad/([0-9]+)(.*)$ index.php?ad=$1&%{QUERY_STRING} [L]
  RewriteRule ^adtype/([0-9]+)/adbrand/([0-9]+)(.*)$ index.php?adtype=$1&adbrand=$2%{QUERY_STRING} [L]
  RewriteRule ^adtype/([0-9]+)(.*)$ index.php?adtype=$1&%{QUERY_STRING} [L]
  RewriteRule ^adcat/([0-9]+)/adbrand/([0-9]+)(.*)$ index.php?adcat=$1&adbrand=$2%{QUERY_STRING} [L]
  RewriteRule ^adcat/([0-9]+)(.*)$ index.php?adcat=$1&%{QUERY_STRING} [L]
  RewriteRule ^adbrand/([0-9]+)/model/([0-9]+)(.*)$ index.php?adbrand=$1&model=$2%{QUERY_STRING} [L]
  RewriteRule ^adbrand/([0-9]+)(.*)$ index.php?adbrand=$1&%{QUERY_STRING} [L]
  RewriteRule ^model/([0-9]+)(.*)$ index.php?model=$1&%{QUERY_STRING} [L]
  RewriteRule ^provider/([0-9]+)(.*)$ index.php?provider=$1&%{QUERY_STRING} [L]
  RewriteRule ^profile/([0-9]+)(.*)$ index.php?profile=$1&%{QUERY_STRING} [L]
  RewriteRule ^page/([0-9]+)(.*)$ index.php?page=$1&%{QUERY_STRING} [L]
  RewriteRule ^list/([a-z]+)(.*)$ index.php?list=$1&%{QUERY_STRING} [L]
  RewriteRule ^view/([a-z]+)(.*)$ index.php?view=$1&%{QUERY_STRING} [L]
  RewriteRule ^login index.php?action=login&%{QUERY_STRING} [L]
  RewriteRule ^rss/([a-z]+)(.*)$ rss/index.php?view=$1&%{QUERY_STRING} [L]
  
</IfModule>

<IfModule mod_deflate.c>
<FilesMatch ".(js|css)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>

#####################################################
# CONFIGURE media caching
#
Header unset ETag
FileETag None
<FilesMatch "(?i)^.*.(ico|flv|jpg|jpeg|png|gif|js|css)$">
Header unset Last-Modified
Header set Expires "Fri, 21 Dec 2012 00:00:00 GMT"
Header set Cache-Control "public, no-transform"
</FilesMatch>
#
#####################################################

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_HOST, QUERY_STRING, REQUEST_FILENAME

Comments

Apache