VPS侦探论坛
标题:
jtbc cms的ngnix伪静态规则
[打印本页]
作者:
secker
时间:
2012-6-1 09:05
标题:
jtbc cms的ngnix伪静态规则
如题,求大牛指点
作者:
secker
时间:
2012-6-1 09:08
下面是apache下针对jtbc的规则
#伪静态
RewriteEngine on
RewriteRule ^aboutus/detail-(.[0-9]*).html$ aboutus/index.php?type=detail&id=$1
RewriteRule ^aboutus/detail-(.[0-9]*)-(.[0-9]*).html$ aboutus/index.php?type=detail&id=$1&page=$2
RewriteRule ^article/list-(.[0-9]*)-0.html$ article/index.php?type=list&classid=$1
RewriteRule ^article/detail-(.[0-9]*).html$ article/index.php?type=detail&id=$1
RewriteRule ^article/detail-(.[0-9]*)-(.[0-9]*).html$ article/index.php?type=detail&id=$1&page=$2
RewriteRule ^download/list-(.[0-9]*)-0.html$ download/index.php?type=list&classid=$1
RewriteRule ^download/detail-(.[0-9]*).html$ download/index.php?type=detail&id=$1
RewriteRule ^download/detail-(.[0-9]*)-(.[0-9]*).html$ download/index.php?type=detail&id=$1&page=$2
#防盗链
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://localhost/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://localhost$ [NC]
RewriteCond %{HTTP_REFERER} !^http://localhost/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://localhost$ [NC]
RewriteRule .*.(png|gif|jpg|swf|flv)$ http://localhost/logo.gif [R,NC]
作者:
secker
时间:
2012-6-1 09:10
另:
rewrite规则写在nginx.conf里面是否比写在.htaccess文件里面效率高?
欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/)
Powered by Discuz! X3.4