YII

How to Remove web from URL in YII?

How to Remove web from URL in YII?

Yii is a high-performance PHP framework best for developing Web 2.0 applications.

By using Two ways we can hide or remove the web from URL in YII.
One is using .htaccess file we can hide the Web.
Second one is By moving index.php file from web folder to root folder.

Lets see how the Second method will work:

Once you Installed your YII framework, Your folder structure will like below :

You can find Web folder inside your Installed folder.
Inside web folder you can find index.php file,
Move the index.php file from web to root.



Now your folder structure will be :

Open index.php file :

it will like :

Change the Directory paths like below :

That’s all, Now you will not see the web on your URL.

If you like this article please don’t forget to share and commant.
Thanks!.
Happy Coding.