Skip to content

Instantly share code, notes, and snippets.

@jeremymarc
Created June 27, 2012 21:16
Show Gist options
  • Save jeremymarc/3006910 to your computer and use it in GitHub Desktop.
Save jeremymarc/3006910 to your computer and use it in GitHub Desktop.
Rewrite rule for subdomain with sf2
RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com$
RewriteCond www/%{REQUEST_FILENAME} !-f
RewriteCond www/%{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ app_dev.php/subdomain/ [QSA,L]
@jeremymarc
Copy link
Author

RewriteCond %{HTTP_HOST} ^subdomain\.domain\.com$
RewriteCond %{REQUEST_URI} !^/subdomain/
RewriteCond www/%{REQUEST_FILENAME} !-f
RewriteCond www/%{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /subdomain/$1 [QSA,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ app_dev.php [QSA,L]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment