Hi, yesterday I purchased a domain and tried to configure my yii2 application.
I was able to configure it so that https://www.mysite.com/frontend/web/index.php is reached through https ://www. mysite .com/,
but if I click on one of the buttons on the home page it redirects me to this address: https:// www.mysite.com/frontend/web/index.php?r=site%2Fabout .
The index is in root/frontend/web/index.php
I’d like to remove the ‘frontend/web’ part of the url and enable Pretty Urls, but I don’t know how to replicate the Apache configuration on IIS, unfortunately it is my first time using it.
evstevemd
(Stefano Mtangoo)
June 30, 2022, 8:57am
2
I don’t know how to do that in IIS, but if you can use Apache then go for vhost and it is super simple!
Unfortunately, the server I bought uses Windows with ISS and MSSQL, if I can’t solve it I will apply to move to Linux
evstevemd
(Stefano Mtangoo)
June 30, 2022, 10:46am
4
Last time I used IIS for PHP is was all troubled waters!
But you can install Apache2 to Windows too
Gildo
(MasterG)
July 7, 2022, 11:46am
5
Youu have 2 alternatives:
Use path aliases (less desirable)
Go to the website list, and create a new website for each web folder
Bonus tip: The IIS manager has a tool to convert the urs rules from the .htaccess file