Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Enable Pretty urls in Yii2 Framework

In this tutorial, I will share how to enable pretty Urls in the Yii2 Framework with the easy and simple code snippet. if you are using the basic application of the Yii2 framework, then add the following code in /config/web.php file and save it. It will remove the index.php and create an SEO friendly URLs.

if you are using the Advance application of the Yii2 framework, then open the common/config/main-local.php file and add the below code.

How to Enable Pretty urls in Yii2 Framework

'components' => [
    'urlManager' => [
            'enablePrettyUrl' => true,
        ],
],

Hope this tutorial will help you! Please do like and share this tutorial with your friends and don’t forget to subscribe this blog to get the all future tutorial directly in your email box.

The post How to Enable Pretty urls in Yii2 Framework appeared first on FreeWebMentor.



This post first appeared on Programming Blog Focused On Web Technologies, please read the originial post: here

Share the post

How to Enable Pretty urls in Yii2 Framework

×

Subscribe to Programming Blog Focused On Web Technologies

Get updates delivered right to your inbox!

Thank you for your subscription

×