实现栏目目录伪静态,比如news/china/69_1.html 是伪静态实现的,而不是生成静态的。纯绿色不影响帝国原有伪静态、静态和动态等功能设置。
1:栏目要选静态 不生成
2:内容页存放目录--栏目目录,内容页目录存放形式--不设置目录,(有利SEO,方便匹配栏目ID)
3:内容页文件命名形式 不能是目录,但是支持信息文件名的修改,URL也能很好看
4:栏目目录和信息文件名是英文或数字(栏目目录建议英文或英文开头,“-_”上下划线留着给别的东西用吧避免冲突如其它伪静态,避免冲突)
********为了通用只能遵守上述要求,有这些特殊需求自己改去*********
栏目设置截图演示:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<Files ~ "^.(htaccess|htpasswd)$"> deny from all </Files> RewriteEngine on #栏目 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/) RewriteRule ^([0-9a-zA-Z/]+)/(|index.html|index_[0-9]+.html)$ /e/action/list.php?classid=$1&page=$2 #内容 RewriteCond %{QUERY_STRING} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^(d/|e/|html/|images/|s/|search/|skin/|t/) RewriteRule ^([0-9a-zA-Z/]+)/([0-9a-zA-Z]+)([_0-9]*).html$ /e/action/show.php?classid=$1&id=$2&page=$3 |
在/e/action/下增加list.php、show.php(文件在压缩包中下载)
文章评论