Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Mar 03, 2015 9:29 pm 
Offline
Newbie

Joined: Tue Mar 03, 2015 9:19 pm
Posts: 3
I created a script to have apache redirect viewers to a maintenance page, but still allow me to view the site normally using an IP address exception. The problem is, after doing a quick test, the script doesn't redirect to the maintenance page at all. It worked on the previous servers I've used it on.

Code:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^255\.255\.255\.255$ #IPv4
RewriteCond %{REMOTE_ADDR} 0000:0000:0000:0000:0000:0000:0000:0000 #IPv6
RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif|svg|css|js) [NC]
RewriteRule .* /maintenance.html [R=302,L]
</IfModule>


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group