投稿 评论 顶部

nginx伪静态正则转apache伪静态正则 实例

佚名 网络安全

ngxin 正则表达式



rewrite "^/goods/(\d+)\.html$" /index.php?id=$1 last;
??????? rewrite "^/page/([a-z-A-Z]+)\.html$" /index.php?page=$1 last;
??????? rewrite "^/issue/help(\-\d+)?(\-\d+)?\.html" /index.php?cate=$1&id=$2 last;
??????? rewrite "^/friendlist.html" /index.php?action=friendlist last;


apache伪静态正则

RewriteEngine on

RewriteBase /?

RewriteRule ^/goods/(\d+)\.html$ /index.php?id=$1
RewriteRule ^/page/([a-z-A-Z]+)\.html$ /index.php?page=$1
RewriteRule ^/issue/help(\-\d+)?(\-\d+)?\.html$ /index.php?cate=$1&id=$2
RewriteRule ^/friendlist.html$ /index.php?action=friendlist