Htaccess File


# Allow CORS
Header set Access-Control-Allow-Origin "*"

<IfModule mod_expires.c>
    ExpiresActive On
<Files *.php>
  ExpiresByType text/html A0
  ExpiresDefault "access plus 10 days"
  ExpiresByType text/javascript "access plus 1 days"
  ExpiresByType text/css "access plus 1 week"
  ExpiresByType text/plain "access plus 1 month"
  ExpiresByType image/gif "access plus 1 month"
  ExpiresByType image/png "access plus 1 month"
  ExpiresByType image/jpeg "access plus 1 month"
  ExpiresByType application/x-javascript "access plus 1 days"
  ExpiresByType application/javascript "access plus 1 days"
  ExpiresByType application/x-icon "access plus 1 year"

# disable magic quotes. They almost always cause problems!
# does not work on
#php_flag magic_quotes_gpc Off

# Turn on rewrite
RewriteEngine on

# Don't allow these robots
RewriteCond %{HTTP_USER_AGENT} "sogou|semrushbot|feedburner|ahrefsbot|baiduspider|ezooms|" [NC]
RewriteRule ^.*$ [R,L]

RewriteRule ^$ index.php [L]
RewriteRule ^rssfeed.xml    articles/createrss.php [L]
# Rewrite for articles
RewriteRule ^articles/article.(d+)  articles/article.php?article=$1 [L]
RewriteRule ^rotary.css css/rotary.css [L]
RewriteRule ^robots.txt$ robots.php [L,NC]
RewriteRule ^Sitemap.xml$ sitemap.php [L,NC]

# START of block logic
# blocked ip addresses. Add each IP. All but the last should have the [OR] flag. The last one should not have it.
# RewriteCond %{REMOTE_HOST} ^ [OR] # This is my ip address at 12/10/2009 it may change
#<blocked ip addresses start>
#RewriteCond %{REMOTE_HOST} ^
#<blocked ip addresses end>
#RewriteRule .* blocked.php [L]
# END of block logic
Exit mobile version