trollolodn

#yii : .htaccess file

Nov 11th, 2013
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Options +FollowSymLinks
  2.  
  3. IndexIgnore */*
  4.  
  5. RewriteEngine on
  6.  
  7.  
  8.  
  9. #Uncomment "RewriteBase /" when you upload this .htaccess to your web server, and comment it when on local web server
  10.  
  11. #NOTE:
  12.  
  13. #If your application is in a folder, for example "application". Then, changing the "application" folder name, will require you to reset the RewriteBase /[your app folder]
  14.  
  15. #RewriteBase /[your app folder - optional]
  16.  
  17.  
  18.  
  19. # if a directory or a file exists, use it directly
  20.  
  21. RewriteCond %{REQUEST_FILENAME} -s [OR]
  22.  
  23. RewriteCond %{REQUEST_FILENAME} -l [OR]
  24.  
  25. RewriteCond %{REQUEST_FILENAME} -d
  26.  
  27.  
  28.  
  29. # otherwise forward it to index.php
  30.  
  31. RewriteRule ^.*$ - [NC,L]
  32.  
  33. RewriteRule ^.*$ index.php [NC,L]
Advertisement
Add Comment
Please, Sign In to add comment