网站首页 | 站长论坛 | 免费空间申请 | 站长下载 | 站长博客 | 商业主机 | 免费空间推荐站点 | 免费空间排行榜 | 我们知道
 12 12
发新话题
打印

[06-02] 空间不支持静态目录部署吗?

本主题由 痴心无语 于 2008-7-12 17:37 关闭

[06-02] 空间不支持静态目录部署吗?

同题

欢迎光临[飞越极限]社区

http://www.20gd.com

TOP

有支持的,请问是什么程序。一般都放在根目录,如果有放子目录的话请采用子目录绑定。
促销:福建电信数据中心机房1U托管5000元/年,泉州电信托管4500元/年 100M共享保证15M  QQ84866242详谈

TOP

PHPWind论坛,是放在根目录的。

只可以php?fid-2.html这样的
不支持-htm-fid-2.html

欢迎光临[飞越极限]社区

http://www.20gd.com

TOP

引用:
原帖由 感情维护 于 2008-6-2 20:46 发表
PHPWind论坛,是放在根目录的。

只可以php?fid-2.html这样的
不支持-htm-fid-2.html
把官方静态规则PM给我,并告诉空间的IP
促销:福建电信数据中心机房1U托管5000元/年,泉州电信托管4500元/年 100M共享保证15M  QQ84866242详谈

TOP

功能说明:
此功能把论坛的URL转换成更容易被搜索引擎收录的形式,普通用户只需开启静态目录部署功能即可,URL形式如:http://www.phpwind.net/thread.php?fid-2.html,不过这种形式中包含有(.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>

是这个吗,已经发给你了。

欢迎光临[飞越极限]社区

http://www.20gd.com

TOP

要IIS 的静态规则。
促销:福建电信数据中心机房1U托管5000元/年,泉州电信托管4500元/年 100M共享保证15M  QQ84866242详谈

TOP

我也不知道IIS虚拟主机的配置静态规则。

欢迎光临[飞越极限]社区

http://www.20gd.com

TOP

后台开启静态连接试试
促销:福建电信数据中心机房1U托管5000元/年,泉州电信托管4500元/年 100M共享保证15M  QQ84866242详谈

TOP

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
促销:福建电信数据中心机房1U托管5000元/年,泉州电信托管4500元/年 100M共享保证15M  QQ84866242详谈

TOP

还是不行,
只能php?这样的伪静态。

欢迎光临[飞越极限]社区

http://www.20gd.com

TOP

 12 12
发新话题