Posted By

codesnip on 07/31/13


Tagged

apache Yii


Versions (?)

yii hide index.php


 / Published in: Apache
 

URL: http://www.yiiframework.com/wiki/214/url-hide-index-php/

Hiding index.php from url

  1. File: .htaccess
  2.  
  3. LoadModule rewrite_module modules/mod_rewrite.so
  4.  
  5.  
  6.  
  7. RewriteEngine On
  8. RewriteBase /
  9. RewriteCond %{REQUEST_FILENAME} !-f
  10. RewriteCond %{REQUEST_FILENAME} !-d
  11. RewriteRule ^(.*)\?*$ index.php/$1 [L,QSA]
  12.  
  13.  
  14.  
  15. RewriteEngine on
  16.  
  17. # if a directory or a file exists, use it directly
  18. RewriteCond %{REQUEST_FILENAME} !-f
  19. RewriteCond %{REQUEST_FILENAME} !-d
  20.  
  21. # otherwise forward it to index.php
  22. RewriteRule . index.php
  23.  
  24.  
  25.  
  26.  
  27.  
  28. File : conifg/main.php
  29.  
  30. 'urlManager'=>array(
  31. 'urlFormat'=>'path',
  32. 'showScriptName'=>false,
  33. 'caseSensitive'=>false,
  34. ),

Report this snippet  

You need to login to post a comment.