emlog支持固定链接设置来修改日志链接的形式,以此提高链接的可读性和对搜索引擎的友好程度。
支持3种链接形式:
默认形式:http://localhost/emlog/src/?post=1
文件形式:http://localhost/emlog/src/post-1.html
目录形式:http://localhost/emlog/src/post/1
除默认形式外,其他两种均需要服务器支持url重写,apache服务器如果支持url重写设置后将自动生效。
windows服务器需要特别设置后才可以支持,步骤如下:
第一:如果是虚拟主机空间直接联系空间商客服。询问伪静态实现方式,可以提供给他们如下url重写规则:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
RewriteRule ^(.*)/(post|record|sort|author|page)/([0-9]+)$ $1/index.php\?$2=$3
RewriteRule ^(.*)/tag/(.+)$ $1/index.php\?tag=$2
RewriteRule ^(.*)/(post|record|sort|author|page)-([0-9]+)\.html$ $1/index.php\?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/index.php\?tag=$2