CJloHuK/unetlab/master/html/.htaccess - Htaccess File

CJloHuK/unetlab/master/html/.htaccess

# vim: syntax=apache tabstop=4 softtabstop=0 noexpandtab laststatus=1 ruler

# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off

# enable PHP error logging
php_flag log_errors on
php_value error_log /opt/unetlab/data/Logs/php_errors.txt

# PHP settings
php_value session.gc_maxlifetime 86400
php_value post_max_size 200M
php_value upload_max_filesize 180M

# TODO
# ErrorDocument 403 /error.php

<IfModule mod_rewrite.c>
  # http://httpd.apache.org/docs/2.4/rewrite/flags.html
  RewriteEngine On
  RewriteBase /

  # If starts with /api, call API router
  RewriteCond %{REQUEST_URI} ^/api/
  RewriteRule ^(.*)$ /api.php [B,L,QSA]

  # If starts with /auth, call Opauth
  RewriteCond %{REQUEST_URI} ^/auth/
  RewriteRule ^(.*)$ /auth.php [B,L,QSA]

  # If not an auth call, if not a dir and if not a file, call the theme
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ /themes/default/$1 [B,L,QSA]

  # If URL is empty, call the theme
  RewriteRule ^$ /themes/default/ [B,L,QSA]
</IfModule>

On Github License

Files

Download PDF of Htaccess file
REQUEST_FILENAME, REQUEST_URI

Comments

Apache