sergey-exu/namagistralnoi/master/.htaccess - Htaccess File

sergey-exu/namagistralnoi/master/.htaccess

AddDefaultCharset UTF-8

# Mod_Autoindex
<IfModule mod_autoindex.c>
    # Запрещаем просмотр содержимого папок
    Options -Indexes
</IfModule>

# Mod_Rewrite
<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    RewriteEngine On
  
  RewriteCond %{HTTP_HOST} ^www.(.*)$
  RewriteRule ^(.*)$ http://%1/$1 [L,R=301]

    # Backend redirect
    RewriteCond %{REQUEST_URI} ^/backend
    RewriteRule ^backend/(.*)$ backend/web/$1 [L]

    # Statics redirect
    RewriteCond %{REQUEST_URI} ^/statics
    RewriteRule ^statics/(.*)$ statics/web/$1 [L]

    # Frontend redirect
    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteRule ^(.*)$ frontend/web/$1
  
</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, REQUEST_URI, static

Comments

Apache