感情维护 2008-6-2 13:37
[06-02] 空间不支持静态目录部署吗?
[size=7]同题[/size]
Alex 2008-6-2 16:04
有支持的,请问是什么程序。一般都放在根目录,如果有放子目录的话请采用子目录绑定。
感情维护 2008-6-2 20:46
PHPWind论坛,是放在根目录的。
只可以php?fid-2.html这样的
不支持-htm-fid-2.html
Alex 2008-6-2 20:47
[quote]原帖由 [i]感情维护[/i] 于 2008-6-2 20:46 发表 [url=http://www.171zz.com/redirect.php?goto=findpost&pid=849936&ptid=152849][img]http://www.171zz.com/images/common/back.gif[/img][/url]
PHPWind论坛,是放在根目录的。
只可以php?fid-2.html这样的
不支持-htm-fid-2.html [/quote]
把官方静态规则PM给我,并告诉空间的IP
感情维护 2008-6-2 23:10
功能说明:
此功能把论坛的URL转换成更容易被搜索引擎收录的形式,普通用户只需开启静态目录部署功能即可,URL形式如:[url]http://www.phpwind.net/thread.php?fid-2.html[/url],不过这种形式中包含有(.php?), 可能会被某些搜索引擎判定为是动态页面, 而降低网站内容被收录的机率,为了能更好的提高您的网站被搜索引擎收录的机率,可以使用参照下面的方法对服务器进行相关设置
使用方法:
以apache服务器为例介绍使用方法.
1.在静态目录部署中,开启静态目录部署功能,将静态目录设置为"-htm-",将静态目录扩展名设置为:".html"
默认的URL形式为 "http://www.phpwind.net/thread.php?fid=2"
新的URL形式为 "http://www.phpwind.net/thread-htm-fid-2.html"
这种纯静态形式的URL更易被搜索引擎收录
2.Apache Web Server 的配置
首先确定加载了 Mod_rewrite 模块,方法: 检查 conf/httpd.conf 中是否存在以下两段代码 (具体路径可能会有所不同,但形式基本是一样的):
(一)LoadModule rewrite_module libexec/mod_rewrite.so
(二)AddModule mod_rewrite.c
如果存在,那么在配置文件(通常就是conf/httpd.conf)中加入如下代码。此时须注意,如果网站使用通过虚拟主机来定义,请务必加到虚拟主机配置中去,否则可能无法使用。改好后然后将 Apache 重启.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
</IfModule>
是这个吗,已经发给你了。
Alex 2008-6-3 21:57
2.配置IIS_Rewrite
a.打开http.ini,把里面内容替换成: (把只读属性改为可写)
[ISAPI_Rewrite]
# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2
#dz+ss完整静态化设置[上面两行是PHPWIND语法]
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
RewriteRule ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2
RewriteRule ^(.*)/archiver/((fid|tid)-[0-9]+\.html)\?*(.*)$ $1/archiver/index\.php\?$2&$4
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forumdisplay\.php\?fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/viewthread\.php\?tid=$2&extra=page\=$4&page=$3&$4
RewriteRule ^(.*)/profile-(username|uid)-(.+)\.html\?*(.*)$ $1/viewpro\.php\?$2=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/space\.php\?$2=$3&$4
RewriteRule ^(.*)/tag-(.+)\.html\?*(.*)$ $1/tag\.php\?name=$2&$3 RewriteRule ^(.*)/?uid/([0-9]+)$ $1$2 [L]
RewriteRule ^(.*)/([0-9]+)$ $1/index\.php\?uid-$2 [L]
RewriteRule ^(.*)/([0-9]+)/spacelist(.+)$ $1/index\.php\?uid/$2/action/spacelist/type$3 [L]
RewriteRule ^(.*)/([0-9]+)/viewspace(.+)$ $1/index\.php\?uid/$2/action/viewspace/itemid$3 [L]
RewriteRule ^(.*)/([0-9]+)/viewbbs(.+)$ $1/index\.php\?uid/$2/action/viewbbs/tid$3 [L]
RewriteRule ^(.*)/([0-9]+)/$ $1/index\.php\?uid-$2 [L]
RewriteRule ^(.*)/([0-9]+)/action-(.+)$ $1/index\.php\?uid-$2-action-$3 [L]
RewriteRule ^(.*)/action-(.+)$ $1/index\.php\?action-$2 [L]
RewriteRule ^(.*)/category-(.+)$ $1/index\.php\?action/category/catid-$2 [L]
RewriteRule ^(.*)/viewnews-(.+)$ $1/index\.php\?action/viewnews/itemid-$2 [L]
RewriteRule ^(.*)/viewthread-(.+)$ $1/index\.php\?action/viewthread/tid-$2 [L]
RewriteRule ^(.*)/mygroup-(.+)$ $1/index\.php\?action/mygroup/gid-$2 [L]
3.设置PHPWIND
a.
利用管理员用户登陆后台->静态目录部署
是否开启静态目录部署功能 是
静态目录 -htm-
静态目录扩展名设置 .html