Guest User

Mod Rewrite rule to Zeus Server rule (Codeigniter)

a guest
Feb 27th, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. http://www.mysite.com/index.php/controller
  2.  
  3. http://www.mysite.com/controller
  4.  
  5. RewriteEngine on
  6. RewriteCond $1 !^(index.php|images|robots.txt)
  7. RewriteRule ^(.*)$ /index.php/$1 [L]
  8.  
  9. RewriteCond %{REQUEST_FILENAME} !-f
  10. RewriteRule ^[^/]*.html$ index.php
  11.  
  12. match URL into $ with ^/[^/]*.html$
  13. if matched then set URL = /index.php
  14.  
  15. map path into SCRATCH:DOCROOT from /
  16.  
  17. set SCRATCH:ORIG_URL = %{URL}
  18. set SCRATCH:REQUEST_URI = %{URL}
  19.  
  20. look for file at %{SCRATCH:DOCROOT}%{SCRATCH:REQUEST_URI}
  21. if not exists then look for dir at %{SCRATCH:REQUEST_URI}%{SCRATCH:REQUEST_URI}
  22. if not exists then set URL = /index.php%{SCRATCH:REQUEST_URI}
Add Comment
Please, Sign In to add comment