lode/maker/master/public_html/.htaccess - Htaccess File

lode/maker/master/public_html/.htaccess

# timestamped resources
# =====

<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresByType text/css               "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"
</IfModule>

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+).([d]{10}).(css|js)$ $1.$3 [L]

# start redirection
# =====

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On
  RewriteBase /
  
  
  # block spammers w/o user agent
  # i.e. java prototypes: http://serverfault.com/questions/308210/the-java-1-4-1-04-user-agent-clashes-404-with-some-jquery-javascript
  # -----
  
  RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
  RewriteCond %{HTTP_USER_AGENT} Java.*
  RewriteRule ^.* - [F]
  
  
  # basic auth in php cgi mode
  # -----
  
  # RewriteCond %{HTTP:Authorization} (.+)
  # RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization},L]
  
  
  # nicer uris
  # "/$1" fills the PATH_INFO
  # -----
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule ^(.*)$ index.php/$1 [L]
  
</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_USER_AGENT, PATH_INFO, REMOTE_USER, REQUEST_FILENAME

Comments

Apache