apache
temporarily redirecting all traffic except images to static page
Submitted by benl on Fri, 07/23/2010 - 13:29
Related Terms :
Here's an .htaccess file that does the trick nicely, even providing a 302 temporary redirect:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png)$
RewriteRule !^site_maintenance\.html$ /site_maintenance.html [L,R=302]
</IfModule>Subdomains on localhost
Submitted by benl on Tue, 03/16/2010 - 15:55
Related Terms :
Say you are into developing locally, but want to have distinct domains for each project you've got.
IE -
foo.localhost
bar.localhost
jo-mama.localhost
Here's the easiest way I found for doing this in Ubuntu 9.10:
sudo nano /etc/hostsHere you'll want to add in unique identifiers for each of the subdomains, such as:
127.0.0.1 localhost
127.0.0.2 foo.localhost
127.0.0.3 bar.localhost
127.0.0.4 jo-mama.localhostsudo nano /etc/apache2/sites-available/subdomains