apache_conf 维护页面重定向

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf 维护页面重定向相关的知识,希望对你有一定的参考价值。

# Everyone EXCEPT specified IP Address is redirected to Maintenance page
# Check you IP Address by Googling 'my ip address'
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^11\.111\.111\.111 
RewriteCond %{REMOTE_ADDR} !^22\.222\.222\.222 
RewriteCond %{REQUEST_URI} !^/maintenance\.html$
RewriteCond %{REQUEST_URI} !.(jpe?g|png|gif|svg) [NC]
RewriteRule ^(.*)$ http://domain.com/maintenance.html [R=307,L]
# Everyone is redirected to Maintenance page
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/maintenance\.html$
RewriteRule ^(.*)$ http://domain.com/maintenance.html [R=307,L]

以上是关于apache_conf 维护页面重定向的主要内容,如果未能解决你的问题,请参考以下文章

apache_conf .htaccess维护重定向

apache_conf 301重定向以维护SEO

apache_conf 404错误重定向到错误页面

apache_conf 404重定向到自定义页面

apache_conf 在.htaccess中将所有页面重定向到主页

apache_conf 在.htaccess中将所有页面重定向到主页