-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Yii2 Application Development Cookbook - Third Edition
By :
Yii allows you to not only route your URLs to different controller actions, but also to generate a URL by specifying a proper internal route and its parameters. This is really useful because you can focus on internal routes while developing your application, and only worry about real URLs before going live. Never specify URLs directly and make sure that you use the Yii URL toolset. It will allow you to change URLs without rewriting a lot of application code.
Create a new application using the Composer package manager, as described in the official guide at http://www.yiiframework.com/doc-2.0/guide-start-installation.html.
Find your @app/config/web.php file and replace the rules array as follows:
'urlManager' => array(
'enablePrettyUrl' => true,
'showScriptName' => false,
),Configure your application server to use clean URLs. If you are using Apache with mod_rewrite and AllowOverride turned on, then you should add the following lines to the .htaccess...
Change the font size
Change margin width
Change background colour