How to correctly write .htaccess for maintenance mode? -
i know basics writing .htaccess handle maintenance mode page.
i don't want use plugin, need replace whole wp site while in maintenance mode.
i've tried add additional rules allows access wp back-end, specific ips.
i've tried several attempts , got close need.
however, want white-listed ip(s) able see front-end site, without being redirected maintenance page, i'm stuck there.
here's current .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]
what i'm supposed add/change?
did found solution? don't tested wp worked me cms.
options +followsymlinks rewriteengine on # exclude file (otherwise infinity loop) rewritecond %{request_uri} !^/under-construction/maintenance\.php$ # exclude images , css rewritecond %{request_uri} !\.(jpe?g?|png|gif|css) [nc] # if it's not ip address rewritecond %{remote_host} !^111\.222\.333\.444$ # redirect /abc example.com/abc. rewriterule ^(.*)$ http://www.domain.com/under-construction/maintenance.php [r=307,l]
perhaps you.
Comments
Post a Comment