网站才用的是wordpress,之前被黑了,login.php被暴力破解,为了增加安全性,现在经理让我做一个访问控制,只能有一个ip能访问login.php。如果单纯跑一个apache问题很容易解决加两行rewrite就能搞定,现在的问题是服务器上跑了好几个web,nginx做的分发;nginxrewrite多条件判..
分类:
其他好文 时间:
2014-12-01 19:32:04
阅读次数:
394
如果一个网站同一套程序绑定了多个域名 www.a.com ,www.b.com,为了区分他们的robots.txt、
百度站长验证文件等,如 www.a.com/robos.txt 的内容来自于 /Virtual/www.a.com/robots.txt
www.b.com/robots.txt 的内容来自于 /Virtual/www.b.com/robots.txt 的方法:
Rewrite...
分类:
Web程序 时间:
2014-12-01 19:16:07
阅读次数:
163
location / { if (!-e $request_filename) { rewrite ^/(.*\.(js|ico|gif|jpg|png|css|bmp|html|xls)$) /$1 last; rewrite ^/(\?\?.*\.(js|css...
分类:
其他好文 时间:
2014-11-28 20:08:15
阅读次数:
207
我的机子是Ubuntu。今天想给url做一个rewrite,让url看起来更漂亮一点。在Apache配置文件(我的是 /etc/apache/apache2.conf)文件中已经把AllOverride 指定为All。并且在.htaccess文件里写了如下rewrite规则:RewriteEngin...
分类:
Web程序 时间:
2014-11-25 22:53:07
阅读次数:
204
if($cookie_say!="hbnl"){add_headerSet-Cookie"say=hbnl";rewrite.*"$scheme://$host$uri"redirect;}if($cookie_say!="hbnl$remote_addr"){add_headerSet-Cookie"say=hbnl$remote_addr";rewrite.*"$scheme://$host$uri"redirect;}rewrite_by_lua‘localrandom=ngx.var.cookie_r..
分类:
其他好文 时间:
2014-11-24 13:47:19
阅读次数:
300
REWRITE伪静态一、Apache配置:进入/etc/httpd/conf/目录下,打开httpd.conf文件。启用rewrite# LoadModule rewrite_module modules/mod_rewrite.so 去除前面的 #启用.htaccess AllowOverride...
分类:
其他好文 时间:
2014-11-22 14:36:37
阅读次数:
199
最近在检测天气预报15天查询网 站(http://tqybw.net)时的URL时,发现页面中有很些404页,分析发现,是请求地址的能参数中多了下划线“_”,而rewrite规 则中并没有配这样的规则,数据库表中出现“_”,并不多,想找出来把下划线去掉,按照正常的查找,结果返回记录不正常,找了下资料...
分类:
数据库 时间:
2014-11-20 18:38:35
阅读次数:
209
一:简介
iozone是一个文件系统的benchmark工具,
用于测试不同的操作系统中文件系统的读写性能,
可以测试以下13种模式
0=write/rewrite
1=read/re-read
2=random-read/write
3=Read-backwards
4=Re-write-record
5=stride-read
6=fwrite/re-fwrite
7=fread/Re-fread
8=random mix
9=pwrite/Re-pwrite
10=pread/Re-pread
11=...
分类:
移动开发 时间:
2014-11-20 09:09:04
阅读次数:
224
今天项目要求从Apache转到Nginx,遇到了要将原来的rewrite规则移过来的问题,找了半天资源,居然有一个转换工具,地址如下:http://www.anilcetin.com/convert-apache-htaccess-to-nginx/转化后的代码如下: if ($args ~ "^(...
分类:
数据库 时间:
2014-11-19 20:23:25
阅读次数:
205
ubuntu安装nginx时提示error: the HTTP rewrite module requires the PCRE library
需要安装pcre包。
sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev
你可能还需要安装
sudo apt-get install openssl libssl...
分类:
Web程序 时间:
2014-11-19 12:43:59
阅读次数:
180