Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question