H
H
Hovhannes Abovyan2017-07-07 00:14:07
Yii
Hovhannes Abovyan, 2017-07-07 00:14:07

YII2 how to do redicrect frotend/web/index.php to url via .htaccess?

I made a website in YII2. After the URL, when I write frontend/web/index.php the site works, I need to make sure that when www.test.ru/drontend/web/index.php is written on the domain, or make a redirect to the main page, or an error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Sanych, 2017-07-07
@mountpoint

It is not necessary to do so. You need to set up the virtual hosts so that the DocumentRoot looks at the frontend/web folder. Then when you enter the site www.test.ru you will get to the main page
Here is an example of how to do it on ubuntu.
I have another question: on what operating system are you developing the site and what development tools do you use: Denwer, Openserver, XAMPP, or did you manually configure everything?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question