我知道编写处理维护模式页面的 .htaccess 的基础知识。
我不想使用插件,因为我需要在维护模式下替换整个 WP 站点。
我尝试添加其他规则以允许访问 WP 后端,仅适用于特定 IP。
我已经尝试了几次尝试,最终非常接近我需要的东西。
但是,我也希望白名单 IP 能够看到前端站点,而不会被重定向到维护页面,但我被困在那里。
这是我当前的.htaccess:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/images [OR]
RewriteCond %{REQUEST_URI} ^/wp-admin/.* [OR]
RewriteCond %{REQUEST_URI} ^/wp-content/.* [OR]
RewriteRule .+ - [L]
RewriteCond %{REMOTE_ADDR} !^93\.62\.93\.79
RewriteCond %{REQUEST_URI} !^/maintenance-mode\.html$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
RewriteRule .* /maintenance-mode.html [R=302,L]
我应该添加/更改什么?