parsed.org

Tips by tag: rewrite

Redirect All Pages To Root by cygnus on Feb 27, 2007 12:16 PM

To redirect all pages to / with Apache, use mod_rewrite:

RewriteEngine On
RewriteRule \/.+ / [L,R]
apacheconfigurationmod_rewriteredirectrewriterules
Time-Based Redirection by xinu on Feb 10, 2005 02:20 PM

If you want to take your site down for maintenance, but leave your webmail portal active on Sundays, you could put this in either your <VirtualHost> block or in an .htaccess file for your site:

RewriteEngine on
RewriteCond %{TIME_WDAY}         0
RewriteRule !^/mail.*            https://path/to/your/maint/page.html
apacheconfigurationhtaccessmod_rewriterewritevirtualhost
RSS