存档

‘网页制作’ 分类的存档

Nginx下只针对logging.php进行https处理的重写规则

2008年8月6日 baalchina 没有评论

在https server下加入如下配置:

if ($uri !~* "/logging.php$")
{
rewrite ^/(.*)$ http://$host/$1 redirect;
}

在http server下加入如下配置:

if ($uri ~* "/logging.php$")
{
rewrite ^/(.*)$ https://$host/$1 redirect;
}

最后结果就是,用户会且只会在访问logging.php的情况下,才会通过https访问。有效地避免了arp欺骗、嗅探等方法盗取账号密码的行为。

感谢nginx作者的帮助。
http://marc.info/?l=nginx&m=121663148102512&w=2

分类: Linux, Web 标签: , , ,

Discuz发表框添加背景图片

2008年8月6日 baalchina 没有评论

其实就是一个背景图片了。很简单。

首先做一个图片,比如叫做images/post_bg.gif,背景设为透明。

修改forumdisplay.htm以及viewthread.htm模板,找到

<textarea rows="7" cols="80" class="autosave" name="message" id="message" onKeyDown="ctlent(event);" tabindex="2">
</textarea>

修改为:

<textarea rows="7" cols="80" class="autosave" name="message" id="message" style="background:#F5FBFF url(images/post_bg.gif) no-repeat right bottom;" onKeyDown="ctlent(event);" tabindex="2">
</textarea>

红色为修改部分。

注:D61和D6相同,无需修改。

分类: 网页制作 标签: ,

将Discuz!的登陆默认cookie时间修改为1小时

2008年8月6日 baalchina 没有评论

很多人在机房上BBS,结束了之后不退出,可能造成账号丢失。

修改login.htm

找到:

<label>
<input class="radio" type="radio" name="cookietime" value="3600" tabindex="11" $cookietimecheck[3600] />
 {lang login_one_hour}
</label>

修改为

1
2
3
4
<label>
<input class="radio" type="radio" name="cookietime" value="3600" tabindex="11" $cookietimecheck[3600] checked="checked" />
 {lang login_one_hour}
</label>
分类: 网页制作 标签: ,