Lcfvs/DOMArch/master/127.0.0.1/.htaccess - Htaccess File

Lcfvs/DOMArch/master/127.0.0.1/.htaccess

#Copyright 2015 Lcf.vs
#Released under the MIT license
#https://github.com/Lcfvs/DOMArch
<IfModule mod_rewrite.c>
    RewriteEngine On
    
  # host/public
  RewriteCond %{ENV:REDIRECT_REDIRECT_STATUS} ^$
  RewriteCond %{REQUEST_URI} ^/([^/]+)(/[^/]+/.+)$
    RewriteCond %{DOCUMENT_ROOT}/%1/public%2 -f
    RewriteRule . ./public/%2 [L,QSA]
    
    # host/
  RewriteCond %{ENV:REDIRECT_REDIRECT_STATUS} ^$
    RewriteRule ^$ ./system/?class_name=Index&action=indexAction [L,QSA]
    
    # host/class_name/
  RewriteCond %{ENV:REDIRECT_REDIRECT_STATUS} ^$
    RewriteRule ^/([wd-]+)/?$ ./system/?class_name=$1&action=indexAction [L,QSA]
  
    # host/class_name/action
  RewriteCond %{ENV:REDIRECT_REDIRECT_STATUS} ^$
    RewriteRule ^([wd-]+)/([wd-]+) ./system/?class_name=$1&action=$2Action&abc=1323 [L,QSA]
  
    # not-found
  RewriteCond %{ENV:REDIRECT_REDIRECT_STATUS} ^$
    RewriteRule . ./system/?class_name=Error&action=notFoundAction [L,QSA]
</IfModule>

On Github License

Files

Download PDF of Htaccess file
DOCUMENT_ROOT, ENV, REDIRECT_REDIRECT_STATUS, REQUEST_URI

Comments

Apache