Menu
  • HOME
  • TAGS

Using htaccess block access to a range of URLs except for my IP address

.htaccess,url,ip,maintenance,maintenance-mode

I have a similar requirement and do basically the same when I put my page (or a part) on maintenance. The content of the htaccess file looks like this: Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_URI} /thisdirectoryandallcontents RewriteCond %{REMOTE_ADDR} !=111.111.111.111 RewriteRule ^.*$ /maintenance.php [R=302,L] I will explain it step by step...

Timing maintenance mode

php,.htaccess,rewrite,maintenance,maintenance-mode

is it possible to make the maintenance mode via .htaccess method timed? Yes, if maintenance is a set time. For example, Sunday from between 3-4pm (server time) RewriteCond %{TIME_WDAY} =6 RewriteCond %{TIME_HOUR} >15 RewriteCond %{TIME_HOUR} <16 RewriteRule .* /maintenance.html [R=302,L] Read more about mod_rewrite time variables....

Yii2 Dynamic Maintenance Mode

php,yii2,maintenance-mode

You can access to application's components like below: Yii::$app->componentName So, with this component you can access it like below: Yii::$app->maintenanceMode->enable=FALSE; ...

Maintenance page for nginx based nodejs site

node.js,redirect,nginx,maintenance-mode

This is going be a question of how you decide to filter users. If you can filter access on IP address, cookie, or some other request aspect, then it's possible to use an if directive to redirect/rewrite all other users to the maintenance page. You mention using a GET parameter...

Load custom maintenance page to Heroku

heroku,maintenance-mode

No, since there will be no way for the Heroku router to show it if there is a maintenance problem on Heroku. The canonical way is to put that page on Amazon S3, or any other provider that can serve static pages....

Add Maintenance Mode to Spring (Security) app

spring,spring-mvc,spring-security,maintenance,maintenance-mode

I now found two similar solutions which work, but the place where I inject the code doesn't look that nice. For both I add a custom RequestMatcher, which get's @Autowired and checks if Maintenance Mode is enabled or not. Solution 1: @Component public class MaintenanceRequestMatcher implements RequestMatcher { @Autowired SettingStore...