linux 禁止ip访问,ip跳转页面
conf添加一条server
server {
listen 80 default_server;
server_name _;
#ip访问重定向
#rewrite ^ http://www.gsmall168.mobi$request_uri?;
#直接返回403错误
return 403;
}
如果像相面语句一样是指aaa目录下面
rewrite ^ http://www.gsmall168.mobi/aaa$request_uri?;
Make a different in your life