This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 14th, 2013  |  syntax: None  |  size: 0.99 KB  |  views: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. RewriteEngine on
  2. RewriteBase /
  3. DirectoryIndex frontend/www/index.php
  4.  
  5. RewriteCond %{REQUEST_FILENAME} !-f
  6.  
  7. RewriteCond %{REQUEST_URI} cpanel/(.*)$
  8. # Why not "-f" - because it's domain of 3d level: VirtualDocumentRoot /path/to/htdocs/%-3/ and if I use "-f" file not founds :(
  9. RewriteCond backend/www/%1 -F
  10. RewriteRule . backend/www/%1 [L]
  11.  
  12. RewriteCond %{REQUEST_URI} cpanel/(.*)$
  13. RewriteCond backend/www/%1 !-F
  14. RewriteRule . backend/www/index.php?b=%1 [L]
  15.  
  16. RewriteCond %{REQUEST_URI} !cpanel/(.*)$
  17. RewriteCond frontend/www%{REQUEST_URI} -F
  18. RewriteRule . frontend/www%{REQUEST_URI}
  19.  
  20. RewriteCond %{REQUEST_URI} !cpanel/(.*)$
  21. RewriteCond %{REQUEST_FILENAME} !-f
  22. RewriteRule . frontend/www/index.php?f=%{REQUEST_URI}
  23.        
  24. .
  25. ├── .htaccess (with code I provided)
  26. ├── frontend
  27. │   ├── www
  28. │       ├── css
  29. │       │   ├── base.css
  30. │       └── index.php
  31. ├── backend
  32.     ├── www
  33.         ├── css
  34.         │   ├── base.css
  35.         └── index.php
clone this paste RAW Paste Data