高人指点下,rewrite规则是如何操作的?
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2 (1)
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3 (2)
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
(3)
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3 (4)
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2 (5)
</IfModule>
这是discuz的规则。。
上面5行中 都有$ 符号 ,,还有$1,$2,$3...
这都是什么意思啊?
RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2 (1)
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3 (2)
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
(3)
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3 (4)
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2 (5)
</IfModule>
这是discuz的规则。。
上面5行中 都有$ 符号 ,,还有$1,$2,$3...
这都是什么意思啊?
...全文
相关推荐
nginx设置rewrite规则
s=/show`,你可以配置如下:```nginxlocation / { rewrite ^(.*)$ /index.php?
nginx rewrite规则
实例解析**假设我们有一个旧的URL格式`/old.php?
教你在IIS环境下配置Rewrite规则
6.0.0/6.1.0** 的Rewrite规则下载地址:[http://www.discuz.net/attachment.php?
discuz的rewrite规则下载
#### 二、Rewrite规则基础概念在深入解析Discuz!提供的Rewrite规则之前,我们首先需要了解一些基本的概念:1.
详解nginx配置location总结及rewrite规则写法
rewrite规则的语法为“rewrite regex replacement [flag]”,其中:- regex是正则表达式,用于匹配请求的URI。


基础编程
