本站使用了 Pjax 等基于 JavaScript 的开发技术,但您的浏览器已禁用 JavaScript,请开启 JavaScript 以保证网站正常显示!

米拓7.2Nginx/Apache伪静态

Nginx已经验证,Apache为转换的,自行验证。

环境:
bt 7.5.1
Nginx 1.18.0
php 7.2
mysql 5.6.50
centos 7.5


Nginx 伪静态:

rewrite ^/index-([a-zA-Z0-9_^\x00-\xff]+).html$ /index.php?lang=$1&pseudo_jump=1;
rewrite ^/public/plugins/ueditor/([a-zA-Z0-9_^\x00-\xff]+).html$ /public/plugins/ueditor/$1.html last;
rewrite ^/app/app/ueditor/([a-zA-Z0-9_^\x00-\xff]+).html$ /app/app/ueditor/$1.html last;
rewrite ^/wap/([a-zA-Z0-9_^\x00-\xff]+).html$ /wap/$1.html last;
rewrite ^/([a-zA-Z0-9_^\x00-\xff]+)/list-([a-zA-Z0-9_^\x00-\xff]+)-([0-9_]+)-([a-zA-Z0-9_^\x00-\xff]+).html$ /$1/index.php?lang=$4&metid=$2&list=1&page=$3&pseudo_jump=1;
rewrite ^/([a-zA-Z0-9_^\x00-\xff]+)/list-([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z0-9_^\x00-\xff]+).html$ /$1/index.php?lang=$3&metid=$2&list=1&pseudo_jump=1;
rewrite ^/([a-zA-Z0-9_^\x00-\xff]+)/list-([a-zA-Z0-9_^\x00-\xff]+)-([0-9_]+).html$ /$1/index.php?metid=$2&list=1&page=$3&pseudo_jump=1;
rewrite ^/([a-zA-Z0-9_^\x00-\xff]+)/list-([a-zA-Z0-9_^\x00-\xff]+).html$ /$1/index.php?metid=$2&list=1&pseudo_jump=1;
rewrite ^/([a-zA-Z0-9_^\x00-\xff]+)/([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z0-9_^\x00-\xff]+).html$ /$1/index.php?lang=$3&metid=$2&pseudo_jump=1;
rewrite ^/([a-zA-Z0-9_^\x00-\xff]+)/([a-zA-Z0-9_^\x00-\xff]+).html$ /$1/index.php?metid=$2&pseudo_jump=1;
rewrite ^/search/tag/([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z]+)-([0-9]+)$ /search/search.php?class1=&class2=&class3=&search=tag&searchword=$1&lang=$2&page=$3;
rewrite ^/search/tag/([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z]+)$ /search/search.php?class1=&class2=&class3=&search=tag&searchword=$1&lang=$2;
rewrite ^/search/tag/([a-zA-Z0-9_^\x00-\xff]+)-([0-9]+)$ /search/search.php?class1=&class2=&class3=&search=tag&searchword=$1&page=$2;
rewrite ^/search/tag/([a-zA-Z0-9_^\x00-\xff]+)$ /search/search.php?class1=&class2=&class3=&search=tag&searchword=$1;
rewrite ^/([a-zA-Z0-9]+)/tag/([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z]+)-([0-9]+)$ /$1/index.php?search=tag&content=$2&lang=$3&page=$4;
rewrite ^/([a-zA-Z0-9]+)/tag/([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z]+)$ /$1/index.php?search=tag&content=$2&lang=$3;
rewrite ^/([a-zA-Z0-9]+)/tag/([a-zA-Z0-9_^\x00-\xff]+)-([0-9]+)$ /$1/index.php?search=tag&content=$2&page=$3;
rewrite ^/([a-zA-Z0-9]+)/tag/([a-zA-Z0-9_^\x00-\xff]+)$ /$1/index.php?search=tag&content=$2;

Apache伪静态:

RewriteRule ^index-([a-zA-Z0-9_^\x00-\xff]+).html$ index.php?lang=$1&pseudo_jump=1
RewriteRule ^public/plugins/ueditor/([a-zA-Z0-9_^\x00-\xff]+).html$ public/plugins/ueditor/$1.html
RewriteRule ^app/app/ueditor/([a-zA-Z0-9_^\x00-\xff]+).html$ app/app/ueditor/$1.html
RewriteRule ^wap/([a-zA-Z0-9_^\x00-\xff]+).html$ wap/$1.html
RewriteRule ^([a-zA-Z0-9_^\x00-\xff]+)/list-([a-zA-Z0-9_^\x00-\xff]+)-([0-9_]+)-([a-zA-Z0-9_^\x00-\xff]+).html$ $1/index.php?lang=$4&metid=$2&list=1&page=$3&pseudo_jump=1
RewriteRule ^([a-zA-Z0-9_^\x00-\xff]+)/list-([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z0-9_^\x00-\xff]+).html$ $1/index.php?lang=$3&metid=$2&list=1&pseudo_jump=1
RewriteRule ^([a-zA-Z0-9_^\x00-\xff]+)/list-([a-zA-Z0-9_^\x00-\xff]+)-([0-9_]+).html$ $1/index.php?metid=$2&list=1&page=$3&pseudo_jump=1
RewriteRule ^([a-zA-Z0-9_^\x00-\xff]+)/list-([a-zA-Z0-9_^\x00-\xff]+).html$ $1/index.php?metid=$2&list=1&pseudo_jump=1
RewriteRule ^([a-zA-Z0-9_^\x00-\xff]+)/([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z0-9_^\x00-\xff]+).html$ $1/index.php?lang=$3&metid=$2&pseudo_jump=1
RewriteRule ^([a-zA-Z0-9_^\x00-\xff]+)/([a-zA-Z0-9_^\x00-\xff]+).html$ $1/index.php?metid=$2&pseudo_jump=1
RewriteRule ^search/tag/([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z]+)-([0-9]+)$ search/search.php?class1=&class2=&class3=&search=tag&searchword=$1&lang=$2&page=$3
RewriteRule ^search/tag/([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z]+)$ search/search.php?class1=&class2=&class3=&search=tag&searchword=$1&lang=$2
RewriteRule ^search/tag/([a-zA-Z0-9_^\x00-\xff]+)-([0-9]+)$ search/search.php?class1=&class2=&class3=&search=tag&searchword=$1&page=$2
RewriteRule ^search/tag/([a-zA-Z0-9_^\x00-\xff]+)$ search/search.php?class1=&class2=&class3=&search=tag&searchword=$1
RewriteRule ^([a-zA-Z0-9]+)/tag/([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z]+)-([0-9]+)$ $1/index.php?search=tag&content=$2&lang=$3&page=$4
RewriteRule ^([a-zA-Z0-9]+)/tag/([a-zA-Z0-9_^\x00-\xff]+)-([a-zA-Z]+)$ $1/index.php?search=tag&content=$2&lang=$3
RewriteRule ^([a-zA-Z0-9]+)/tag/([a-zA-Z0-9_^\x00-\xff]+)-([0-9]+)$ $1/index.php?search=tag&content=$2&page=$3
RewriteRule ^([a-zA-Z0-9]+)/tag/([a-zA-Z0-9_^\x00-\xff]+)$ $1/index.php?search=tag&content=$2

 继续浏览关于 的文章

 本文最后更新于 2021/03/20 16:41:18,可能因经年累月而与现状有所差异

 引用转载请注明:icret > > 米拓7.2Nginx/Apache伪静态