Skip to content

Instantly share code, notes, and snippets.

@Sutto
Created August 7, 2008 07:46
Show Gist options
  • Save Sutto/4360 to your computer and use it in GitHub Desktop.
Save Sutto/4360 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
# Redirect WWW-requests to no-wwww
ServerName www.domain.com
DocumentRoot /var/www/
RedirectMatch permanent (.*) http://whygosolo.com$1
</VirtualHost>
<VirtualHost *:80>
ServerName domain.com
DocumentRoot /path/to/app/current/public
# Use Mod rewrite for maintenance - optional!
RailsAllowModRewrite on
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment