wordpress、织梦、帝国CMS伪静态规则

伪静态需要在IIS--默认网站--属性--ISPAI_REWRITE里面点import from v2.0选择httpd.ini(伪静态配置文件)

WordPress伪静态问题

https://wordpress.org/wordpress-4.9.8.tar.gz

Apache伪静态规则:

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

Nginx伪静态规则

location / {

try_files $uri $uri/ /index.php?$args;

}

# Add trailing slash to */wp-admin requests.

rewrite /wp-admin$ $scheme://$host$uri/ permanent;


织梦伪静态问题

Apache服务器,在.htaccess文件中加入

RewriteRule ^index.html$ index.php

RewriteRule ^([0-9]+).html$ ?ct=question&askaid=$1

RewriteRule ^([0-9]+)$ ?ct=browser&tid=$1

RewriteRule ^t([0-9]+)$ ?ct=browser&tid2=$1


帝国CMS伪静态规则

Apache下伪静态

#首页伪静态RewriteRule ^index\.html$ index.php#信息列表页RewriteRule ^listinfo-([0-9]{1,})-([0-9]{1,})\.html$ /e/action/ListInfo/index.php?classid=$1&page=$2#信息内容页RewriteRule ^showinfo-([0-9]{1,})-([0-9]{1,})-([0-9]{1,})\.html$ /e/action/ShowInfo.php?classid=$1&id=$2&page=$3#标题分类列表页RewriteRule ^infotype-([0-9]{1,})-([0-9]{1,})\.html$ /e/action/InfoType/index.php?ttid=$1&page=$2#TAGS信息列表页RewriteRule ^tags-([0-9]{1,})-([0-9]{1,})\.html$  /e/tags/index.php?tagname=$1&page=$2

Nginx下伪静态

rewrite ^([^\.]*)/listinfo-([0-9]+)-([0-9]+)\.html$ $1/e/action/ListInfo/index.php?classid=$2&page=$3 last;rewrite ^([^\.]*)/showinfo-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/e/action/ShowInfo.php?classid=$2&id=$3&page=$4 last;rewrite ^([^\.]*)/infotype-([0-9]+)-([0-9]+)\.html$ $1/e/action/InfoType/index.php?ttid=$2&page=$3 last;rewrite ^([^\.]*)/tags-(.+?)-([0-9]+)\.html$ $1/e/tags/index.php?tagname=$2&page=$3 last;if (!-e $request_filename) {return 404;

}

你可能感兴趣的:(wordpress、织梦、帝国CMS伪静态规则)