Archive

Posts Tagged ‘Wordpress’

wordpress iis isapi Permalinks 新规则

August 12th, 2008 No comments

最近准备用wordpress做一个cms类的站,要考虑Permalinks(也就是简洁url)的问题,url的seo
优化是一个最基础的东西。wordpress的url的问题涉及到url重写(url rewrite)的,url重写是apache的
长项,不过iis加了ISAPI_Rewrite 也差不多,不过规则什么的就要另外考虑了。
前一段时间自己的blog使用了一个中文wordpress网上流传最多的规则,一共三组,也就是本站前几天发布
的一篇blog,
wordpress iis url rewrite
http://www.humker.com/2008/07/26/wordpress-iis-url-rewrite/
这个规则好理解跟apache的其中一类规则一样,就是一条对应一种url相应,用正则表达式给括号变量赋值,
这个规则对分页总是有问题,这就让我不得不考虑其他的方法。

找到了
http://www.binaryfortress.com/wordpress-url-rewrite/
这个专门为wordpress写的iis的rewrite补丁。
好在跟空间商关系不错,让他帮忙装上了,很好用,就一个配置文件,很省事,就是一个问题是不能实现带有.html 这类扩展,路径中带点的
都不行。
今天不知道怎么不管用,估计是影响其他用户,空间商给停了。
这下没办法了,只有搜,还是google的好用。
找到了这个东西
http://www.basilv.com/psd/blog/2006/running-wordpress-20-under-iis
一个全新的 ISAPI_Rewrite 规则

[ISAPI_Rewrite]

# Defend your computer from some worm attacks
#RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]

# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets through
RewriteRule /software-files/(.*) /software-files/$1 [L]
RewriteRule /images/(.*) /images/$1 [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]

一切ok。
PS:
在这里补充一句中文类的网站copy现象太严重了,找这类东西最好用google,挂上美国的代理,搜外国人写的东西。下一篇文章是介绍中文tag,分类,文章名的问题。

Categories: Wordpress Tags: , , ,

wordpress双引号全角和半角

August 10th, 2008 No comments

wordpress有一个毛病就是将英文的标点符号有半角转为全角,别人复制粘贴你的程序代码时就出现了问题,我的红旗x window起不来就是这个原因。

一个插件Quotmarks Replacer 2.1作者地址

http://sparanoid.com/project/quotmarks-replacer-21/

通过禁用 wptexturize 函数,解决 WordPress 自动将半角的单引号、双引号和省略号转换为全角标点的问题。使后台输入的标点格式与前台读者浏览的标点格式保持一致。

Categories: Wordpress Tags:

wordpress iis url rewrite

July 26th, 2008 No comments

本站wordpress iis 下 url 重写规则,基本上是抄来的。
使用的是isapi,好像还有一个mod_rewrite没有过多研究。

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600

RepeatLimit 32

# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP

# # Below is for permalink like /%year%/%monthnum%/%day%/%postname%/
# # Maybe dumplicate with above!!

RewriteRule /tag/(.*) /index\.php\?tag=$1

RewriteRule /(contact|about-copyright|favor|archives|tags|sitemap|about)/ /index\.php\?pagename=$1

RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?category_name=$1&feed=$2

RewriteRule /category/?(.*)/ /index\.php\?category_name=$1

RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom)/?$ /wp-feed\.php\?author_name=$1&feed=$2

RewriteRule /author/?(.*) /index\.php\?author_name=$1

RewriteRule /feed/?$ /wp-feed\.php/\?feed=rss2

RewriteRule /comments/feed/?$ /wp-feed\.php/\?feed=comments-rss2

RewriteRule /page/(.*)/ /index\.php\?paged=$1

RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/?([0-9]+)?/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&page=$5

RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&day=$3&page=$4

RewriteRule /([0-9]{4})/([0-9]{1,2})/?$ /index\.php\?year=$1&monthnum=$2&page=$3

RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/(feed|rdf|rss|rss2|atom)/?$ /index\.php\?year=$1&monthnum=$2&day=$3&name=$4&feed=$5

RewriteRule /([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/trackback/?$ /wp-trackback\.php\?year=$1&monthnum=$2&day=$3&name=$4&tb=1

RewriteRule /page/(.*)/?s=(.*)    /index\.php\?s=$2&paged=$1

Categories: Wordpress Tags:

wordpress默认主题新的思考

July 25th, 2008 2 comments

wordpress默认主题从刚开始接触到现在基本没有改过,蓝调子,丑死了。

现在从textpattern换成了wordpress,默认主题改观很大,基本该有的标签都有了,比较容易改,改css就可以换套皮肤了。

世界在变,你得慢慢的体会她。

Categories: Wordpress Tags:

WordPress Update Services功能

July 25th, 2008 No comments

WordPress的update services功能简单点说,就是,当你的blog有文章更新了,会向搜索引擎发一个更新通知,然后它们会迅速的收录这篇文章。这也是种重要的SEO优化方式。

WordPress后台可以轻松实现这个功能,在管理后台的“设置”-“录入”下,将wordpress默认提供的地址列表放进去。

http://rpc.pingomatic.com/
http://blogsearch.google.com/ping/RPC2
http://www.xianguo.com/xmlrpc/ping.php
http://www.feedsky.com/api/RPC2
http://ping.feedburner.com/
http://blog.yodao.com/ping/RPC2
http://www.zhuaxia.com/rpc/server.php
http://rpc.technorati.com/rpc/ping

Categories: Wordpress Tags: