以下內容属于 ‘伪静态’ 便签:

Nginx下Xenforo伪静态代码 去掉index.php

折腾了下xenforo,nginx下,涉及到伪静态,需要去掉“index.php?”,由于xenforo在国内这方面的知识并不多,去官方看了下friendurl,使用里面的代码有点小错误提示502错误。 官方的代码 123456789101112131415161718location /xf/ {     try_files $uri $uri/ /xf/index.php?$uri&$args;     index index.php index.html; } location /xf/internal_data/ {     internal; } location /xf/library/ {        internal; } location ~ \.php$ {     try_files $uri =404;     fastcgi_pass    127.0.0.1:9000;     fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;     include […] (more...)

discuz X2.5 nginx伪静态规则(含帖子标签)

以前是用htaccess,后来搬到阿里云,使用nginx,需要把规则放到类似website.conf这样的文件,站搬过去好长一段时间,没有注意这个问题,今天捣鼓着顺着别人提供的nginx discuz X2.5规则,写了个支持标签伪静态的规则,这里要特别说明的是,我修改过DZ部分源码,你要参考《Discuz X2.5 标签(tag)伪静态设置方法及规则 》做一些修改,才能无误。 (more...)

适用于Discuz 7.2的一个伪静态规则.htaccess

适用于Discuz 7.2的一个伪静态规则,注意这个文件适用Apache,不是windows主机,下面是文件.htaccess的代码: (more...)

PHPBB论坛伪静态规则写法

不知道使用PHPbb的人多否,前几天折腾一个论坛,用了BB,于是找了下bb的伪静态,发现不是很多~ 仅有的几个看了下生产日期,发现过期了…… 为此iFans收集了强人的杰作~ 只需要改这四个文件: 1、viewtopic.php 2、viewtopic.php 3、includes/functions_display.php 4、includes/functions.php 分页规则:viewforum-1-0.html -> viewform.php?f=1&start=1 版面两个参数版面id 和分页参数 viewtopic-1-1-1.html -> viewtopic?f=1&t=1&start=1 版面id 帖子id 分页参数 按照规则,在.htaccess里加上下面的代码: RewriteEngine on #phpbb重写规则 RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^viewtopic-(.+)-(.+)-(.+).html$ viewtopic.php?f=$1&t=$2&start=$3 [L,NC] RewriteRule ^viewforum-(.+)-(.+).html$ viewforum.php?f=$1&start=$2 [L,NC] 打开viewtopic.php 649行:’U_VIEW_FORUM’ => append_sid(“{$phpbb_root_path}viewforum.$phpEx”, ‘f=’ . $forum_id), 改为: //’U_VIEW_FORUM’ => append_sid(“{$phpbb_root_path}viewforum.$phpEx”, ‘f=’ . $forum_id), ‘U_VIEW_FORUM’ => “./viewforum”. ‘-‘ […] (more...)

uchome独立使用的伪静态规则

如果你只是安装了UcHome那么上一篇的伪静态规则将对你有参考的作用,但不可直接拿来用。 UcHome直接用的静态规则如下: 1、Htaccess文件内容如下: # 将 RewriteEngine 模式打开 RewriteEngine on # Rewrite 系统规则请勿修改 # Collected By weijingtai.com for and uchome RewriteRule ^/(space|network)-(.+).html$ /$1.php?Rewrite=$2 [L] RewriteRule ^/(space|network).html$ /$1.php [L] RewriteRule ^/([0-9]+)$ /space.php?uid=$1 [L] Httpd.ini规则如下,Chinaapp提示此文件需要修改你的UcHome安装目录 [ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 # Collected By weijingtai.com for uchome 1.5 # /home为uchome目录,根据自己安装目录修改 RewriteRule ^/(space|network)-(.+).html$ /$1.php?rewrite=$2 [L] […] (more...)

UChome和discuz共用的伪静态规则

UChome 和Discuz共用的伪静态规则文件: # 将 RewriteEngine 模式打开 RewriteEngine on # Rewrite 系统规则请勿修改 # Collected By weijingtai.com for discuz 7.0 and uchome # /home为uchome目录,根据自己安装目录修改 RewriteRule ^/(space|network)-(.+).html$ /$1.php?rewrite=$2 [L] RewriteRule ^/(space|network).html$ /$1.php [L] RewriteRule ^/([0-9]+)$ /space.php?uid=$1 [L] RewriteRule ^archiver/((fid|tid)-[w-]+.html)$ archiver/index.php?$1 RewriteRule ^forum-([0-9]+)-([0-9]+).html$ forumdisplay.php?fid=$1&page=$2 RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+).html$ viewthread.php?tid=$1&extra=page%3D$3&page=$2 RewriteRule ^space-(username|uid)-(.+).html$ space.php?$1=$2 RewriteRule ^tag-(.+).html$ tag.php?name=$1 不要忘了还有个httpd.ini [ISAPI_Rewrite] # 3600 = 1 […] (more...)

wordpress的IIS7伪静态 URL Rewrite

wordpress 官方已经内置了 IIS7 URL Rewrite 的支持,但对于中文用户来说,官方内置的伪静态规则不能完好的支持中文tag的问题。虽然可以更改系统文件来解决,但比较麻烦,而且不方便,所以一直没介绍过。现在帖出一个自用的的规则,可以解决wordpress的中文tag的问题。 将下列代码加入到web目录下的web.config文件的<system.webServer>之后即可。 (more...)

wordpress使用Windows主机iis环境下的伪静态

wordpress从2.x以后自带永久链接(Permalink-伪静态)的支持,不过在iis环境下,链接后带有index.php的方式,如 http://www.weijingtai.com/index.php/2009/04/10/wordpress-27-win-iis-rewrite,如何去掉烦人的index.php呢,网上有不少方法,一种通过404错误页进行跳转,不过由于不知对搜索引擎是否有影响,就不推荐了。以下给出的规则,利用isapi-rewrite组件,可完全实现wordpress的永久链接,支持后台自带的多种链接形势,无需带index.php参数。isapi-rewrite组件目前国内大多数主机商默认自带,不需要安装,下载文后提供的httpd.ini规则放入wp的根目录即可生效。   (more...)