Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 29th, 2012  |  syntax: None  |  size: 0.36 KB  |  views: 89  |  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. Redirect subdomain to CakePHP action
  2. <IfModule mod_rewrite.c>
  3.   Options +FollowSymLinks
  4.   RewriteEngine on
  5.   RewriteCond %{HTTP_HOST} ^(.*).myserver.com$ [NC]
  6.   RewriteRule ^(.*)$ http://myserver.com/m/%1/$1 [L]
  7. </IfModule>
  8.        
  9. RewriteCond %{HTTP_HOST} ^([^.]+).myserver.com$ [NC]
  10. RewriteRule (?!^m/$)^.*$ http://myserver.com/m/sites/%1%{REQUEST_URI} [NC,L,P]