Htaccess File


# 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

# ErrorDocument 403 /error.php

<IfModule mod_rewrite.c>
  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]
Exit mobile version