M
M
Musgood2015-04-15 11:49:40
Yii
Musgood, 2015-04-15 11:49:40

How to set up .htaccess for subdomain hosted with yii2 web application?

There is a working web application on Yii2. The task is to add a second site, how to configure .htaccess for this?
Second site is just static HTML

File structure
Yii2 files are located in public_html root
Second site files in /public_html/site2/index.html folder

.htaccess:

# Mod_Autoindex
<IfModule mod_autoindex.c>
    # Disable Indexes
    Options -Indexes
</IfModule>

# Mod_Rewrite
<IfModule mod_rewrite.c>
    Options +FollowSymlinks
    # Enable mod_rewrite
    RewriteEngine On
  RewriteBase /
    RewriteCond %{REQUEST_URI} ^(.*)$
    RewriteRule ^(.*)$ web/$1
</IfModule>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question