mod_rewrite简单应用

简单定向
RewriteRule ^/anything http://other.server.com/somewhere
will never match, because the incoming URL never has a leading slash in directory context. This is explained in detail in the Apache documentation, see the resource links.
Troubleshooting
定义错误页面
Pre-built “magic” error pages
There are some “magic” error pages settings which could be problematic when you want to use rewrite rules. The most simple […]

...

W3C标准下解决FireFox浏览器innerHTML属性无效的方法

如果用XHTML开发网页,即网页源代码头用了如下标准声明(注意:如果你使用的编码不是utf-8,下面第二行的lang属性会有所不同,比如你使用GB2312中文编码,那么lang属性应该为lang=”gb2312″,其他编码方式也会有所不同):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html xmlns="http://www.w3.org/1999/xhtml" lang="UTF-8">
这样页面就是...

JavaScript判断后缀(js)

下载: select.html<script>  
  function  check(oForm)  
  {  
    var ext = "*.jpg,*.gif,*.png";
    s = oForm.f.value;
    s = s.substr(s.lastIndexOf("."));
   
    if(ext.indexOf("*"+s)==-1)  
    {  
      alert("不允许"+s)  
      return   false  
    }  
  }  
</script> &...

resin admin 403解决和设置密码

我的resin装在/usr/local/resin/
解决公网访问resin-admin
修改配置文件/usr/local/resin/conf/resin.conf,找到:
<prologue>          <resin:set var="resin_admin_external" value="false"/>          <resin:set var="resin_admin_insecure" value="true"/>        </prologue>
修改为:
<prologue>          <resin:set var="resin_admin_external" value="true"/>         &nb...

windows下自动切换ip小脚本

从办公到家庭环境,或者从会议室到办公工位上的IP切换.
1. 切换成自动获取IP
@echo offnetsh interface ip set address name="local" source=dhcpnetsh interface ip set dns name="local" source=dhcp
2. 切换成固定IP
@echo offnetsh interface ip set address local static 192.168.0.100 255.255.255.0 192.168.0.1netsh interface ip set dns local 192.168.0.1netsh interface ip add dns local  8.8.8.8 index=2
“local” 是你的本地网卡名称,也可能是 “本地连接”,需要自己替换下。如果是2个固定IP间的来回切换,把第2...

mysqlslap简单压力测试

mysqlslap是官方提供的压力测试工具之一,官方介绍如下:
mysqlslap is a diagnostic program designed to emulate client load for a MySQL server and to reportthe timing of each stage. It works as if multiple clients are accessing the server. mysqlslap isavailable as of MySQL 5.1.4.
下面介绍一些常见参数:
–auto-generate-sql-write-number每个线程中产生多少个insert
–auto-generate-sql-guid-primary自动产生guid格式的主键
–number-of-queries=50000每个连接客户端总共发起的查询次数
–concurrency=10,50,100并发连接线程数,分...

几个英文SEO工具

罗列几个英文SEO工具
1.英文关键字分析工具
SEOBOOK网站上的一个很好用的英文关键分析工具,索引数据来几wordtracker和几大搜索引擎,需要注册,免费的。

2.wordtracker
很好用,有免费试用的.是一个功能很强大的英文关键词分析工具,资金多的话可以购买,对关键字研究有非常大的帮助。
3.Google 网站管理员中心
任何网站站长都有必要好好看看管理员中心的文档
4.Yahoo Site Explorer
可以很好查询网站页面数和英文外链接
5.http://www.seoquake.com
英文IE或...

如何高质量的为英文站做链接

下面这些:
1.对方网站相关性
2.链接页面导出数量
3.链接瞄文本
4.链接所在的位置
5.链接周围的文字相关性
6.域名的权重
7.IP段远近,相关性
8.域名注册信息相似程度
9.链接页面对应关键词排名
10.域名历史
11.链接中是否存在瞄文本相关的词,伪静态
12.自己本链接页面的跟瞄文本的相关性
瞄文本多样化
链接多样化
上面是自己所说的,忘记说上:Nofollow以及链接形式,不过这两点,默认都是指文字链接,以及follow。不过...

解决3389终端服务器超出连接数

因为使用了3389登录服务器后没有及时注销或者其他情况而泛起再次登陆时提示:终端服务器超出了最大答应连接数。
下面给大家说一个可以在不进入服务器的情况下,强行登陆!当你服务器泛起这样提示的时候你也不用再发愁重启服务器了。方法如下:
按开始 — 运行— mstsc /console /v: 服务器名或IP或域名
例如 mstsc /console /v:8.8.8.8
或者 mstsc /console /v:www.xok.la
也可以 mstsc xok.la.rdp /console
那这样就可以用自己的帐号强行登陆服务器了!
下面是关于mstsc...