discuz X 伪静态规则-IIS -Nginx-Apache

2010/05/07 7:16 上午  |  分类:discuz, nginx

康胜刚刚发布了discuz x beta 版本,在管理后台,全局 » 优化设置 » 搜索引擎优化 选中url静态化的选项即可,相关规则文件官方已经出示例,摘录如下:

IIS-Isapi

[ISAPI_Rewrite]
 
[ISAPI_Rewrite]
 
# 3600 = 1 hour
CacheClockRate 3600
 
RepeatLimit 32
 
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
RewriteRule ^(.*)/topic-(.+)\.html\?*(.*)$ $1/portal\.php\?mod=topic&topic=$2&$3
RewriteRule ^(.*)/article-([0-9]+)\.html\?*(.*)$ $1/portal\.php\?mod=article&articleid=$2&$3
RewriteRule ^(.*)/forum-(\w+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=forumdisplay&fid=$2&page=$3&$4
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$5
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+)\.html\?*(.*)$ $1/forum\.php\?mod=group&fid=$2&page=$3&$4
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html\?*(.*)$ $1/home\.php\?mod=space&$2=$3&$4
RewriteRule ^(.*)/([a-z]+)-(.+)\.html\?*(.*)$ $1/$2\.php\?rewrite=$3&$4

全文阅读 »

uchome rewrite for nginx

2010/03/27 6:36 下午  |  分类:discuz, nginx

ngnix下uchome的伪静态规则,可以和discuz的规则合用

1
2
3
4
5
location / {
     rewrite ^(.*)/(space|network)\-(.+)\.html$ $1/$2.php?rewrite=$3 last;
     rewrite ^(.*)/(space|network)\.html$ $1/$2.php last;
     rewrite ^(.*)/([0-9]+)$ $1/space.php?uid=$2 last;
        }

discuz rewrite for nginx

2010/03/27 6:28 下午  |  分类:discuz, nginx

discuz 在nginx下的伪静态规则! (ps:discuz的伪静态规则 ,一般情况下是通用的,不必区分是discuz6还是7)

location / {
      rewrite ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2 last;
      rewrite ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3 last;
      rewrite ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page%3D$4&page=$3 last;
      rewrite ^(.*)/profile-(username|uid)-(.+)\.html$ $1/viewpro.php?$2=$3 last;
      rewrite ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3 last;
      rewrite ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2 last;
        }

Uchome的在这里

typecho的rewrite规则for Nginx

2010/03/20 6:04 下午  |  分类:nginx

typecho在nginx下的rewrite有好多方法,试下来还是这个方便一些!

1
2
3
4
5
6
7
8
9
10
11
12
location / {
        index index.html index.php;
        if (-f $request_filename/index.html){
            rewrite (.*) $1/index.html break;
        }
        if (-f $request_filename/index.php){
            rewrite (.*) $1/index.php;
        }
        if (!-f $request_filename){
            rewrite (.*) /index.php;
        }
    }

全文阅读 »

NGNIX–高性能的 HTTP 和 反向代理 服务器

2010/03/17 12:59 下午  |  分类:nginx

           Nginx (“engine x”) 是一个高性能的 HTTP 和反向代理服务器,也是一个 IMAP/POP3/SMTP 代理服务器。 Nginx 是由 Igor Sysoev 为俄罗斯访问量第二的 Rambler.ru 站点开发的,它已经在该站点运行超过三年了。Igor 将源代码以类BSD许可证的形式发布。

  Nginx 超越 Apache 的高性能和稳定性,使得国内使用 Nginx 作为 Web 服务器的网站也越来越多,其中包括新浪博客新浪播客网易新闻腾讯网搜狐博客等门户网站频道,六间房56.com等视频分享网站,Discuz!官方论坛水木社区等知名论坛,盛大在线金山逍遥网等网络游戏网站,豆瓣人人网YUPOO相册金山爱词霸迅雷在线等新兴Web 2.0网站。

        Nginx不光是一些大型站点应该效率高,而且由于本身的小巧和高效率,深受广大个人站长的喜爱,许多站长应用在vps上以减少系统资源的应用 。以后将添加一些Ngnix的伪静态规则

discuz uchome IIS7 rewrite规则

2010/03/17 12:51 下午  |  分类:IIS7-rewrite, discuz

将以下内容添加到web.config文件中即可

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
            <rules>
                <rule name="Imported Rule 17">
                    <match url="^archiver/((fid|tid)-[\w\-]+\.html)$" ignoreCase="false" />
                    <action type="Rewrite" url="archiver/index.php?{R:1}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 18">
                    <match url="^forum-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="forumdisplay.php?fid={R:1}&amp;page={R:2}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 19">
                    <match url="^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="viewthread.php?tid={R:1}&amp;extra=page\%3D{R:3}&amp;page={R:2}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 20">
                    <match url="^space-(username|uid)-(.+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="space.php?{R:1}={R:2}" appendQueryString="false" />
                </rule>
                <rule name="Imported Rule 21">
                    <match url="^tag-(.+)\.html$" ignoreCase="false" />
                    <action type="Rewrite" url="tag.php?name={R:1}" appendQueryString="false" />
                </rule>
            </rules>
</rewrite>
</system.webServer>
</configuration>

maxcms伪静态支持 FOR IIS7-rewite

2010/02/08 9:31 上午  |  分类:IIS7-rewrite

一位朋友用的国外的godaddy的空间,需要iis7的rewrite,帮他改正了一下,顺便发布出来,保存为web.config文件放到网站根目录下即可

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="channel">
                    <match url="^category/index(.+?).html$" />
                    <action type="Rewrite" url="channel/index.asp?{R:1}.html" />
                </rule>
                <rule name="content">
                    <match url="^movie/index([0-9]+).html$" />
                    <action type="Rewrite" url="content/index.asp?{R:1}.html" />
                </rule>
                <rule name="play">
                    <match url="^player/([0-9]+)-([0-9]+)-([0-9]+).html$" />
                    <action type="Rewrite" url="play/index.asp?{R:1}.html" />
                </rule>
                <rule name="topic.index">
                    <match url="zt/index.html" />
                    <action type="Rewrite" url="zt/index.asp" />
                </rule>
                <rule name="topic">
                    <match url="^zt/([0-9]+).html$" />
                    <action type="Rewrite" url="zt/index.asp?{R:1}.html" />
                </rule>
                <rule name="news.index">
                    <match url="news/index.html" />
                    <action type="Rewrite" url="news/?index.html" />
                </rule>
                <rule name="news">
                    <match url="^news/([0-9]+).html$" />
                    <action type="Rewrite" url="news/index.asp?{R:1}.html" />
                </rule>
                <rule name="index.html">
                    <match url="index.html" />
                    <action type="Rewrite" url="index.asp" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

shopex 4.84伪静态设置方法For win(转)

2009/08/05 9:18 上午  |  分类:shopex

之前介绍了一篇关于shopex4.84的伪静态设置方法,不少朋友觉得不够详细,正好好友诡谲写有一篇详细的介绍,就不再重复,直接转过来。

============================以下为原文============================

由于Shopex官方对win系统支持不够,而且直接在后台开启伪静态会跳出提示,告诉你的服务器不是Apache.不能开启.但是我们依然可以绕过这个限制,需要修改一个文件,该文件位于/core/admin/controller/system/目录下,我们需要修改ctl.setting.php这个文件.但是大家下载打开却发现很多乱码,根本不知道如何下手.其实这是经过zend加密过的源码,我们需要对其进行解密.例如Dezender.这个软件可以直接将经过zend加密过的源码还原成原来的文件.如下图所示.
全文阅读 »

wordpress FOR IIS7 URL Rewrite

2009/07/13 6:54 上午  |  分类:IIS7-rewrite, wordpress

wordpress 官方已经内置了 IIS7 URL Rewrite 的支持,但对于中文用户来说,官方内置的伪静态规则不能完好的支持中文tag的问题。虽然可以更改系统文件来解决,但比较麻烦,而且不方便,所以一直没介绍过。现在帖出一个自用的的规则,可以解决wordpress的中文tag的问题。
全文阅读 »

马克思2.5伪静态详细设置

2009/07/09 9:50 上午  |  分类:isapi-rewrite

马克思2.5新版增加了伪静态的功能,这里详细介绍一下。
maxcms的伪静态基于isapi-rewrite组件来实现,所以在使用伪静态之前,请先确定你所使用的空间支持isapi-rewrite。国内虚拟主机大多都支持此组件,具体情况可以向你的虚拟主机空间商咨询。

自己可以对服务器环境进行配置的用户可以使用本站提供的这一版本 http://www.weijingtai.com/2009/04/08/isapi_rewrite-213/,马克思伪静态测试环境就是使用的这个版本。

确认你的空间支持rewrite组件以后,登陆马克思后台=》系统=》网站配置
全文阅读 »

Pages: 1 2 3 4 Next