Saturday, May 3, 2014

Yii basics

I started messing with Yii, but had to do other things for a while. These notes are worth publishing though :-)

403 error on trying Gii

Commenting the IP filter line in the configuration is not enough to bypass IP filtration. You have to set your IP there to access gii.

Pretty URLs

The following should be inserted in the .htaccess file to have pretty links like instead of

 RewriteEngine on  
 # prevent httpd from serving dotfiles (.htaccess, .svn, .git, etc.)  
 RedirectMatch 403 /\..*$  
 # if a directory or a file exists, use it directly  
 RewriteCond %{REQUEST_FILENAME} !-f  
 RewriteCond %{REQUEST_FILENAME} !-d  
 # otherwise forward it to index.php  
 RewriteRule . index.php  

No comments:

Post a Comment