Zencart156c使用nginx的伪静态规则


rewrite "^(.)-p-(.).html" /index.php?main_page=product_info&products_id=$2&% last;
rewrite "^(.)-c-(.)" /index.php?main_page=index&cPath=$2&% last;
rewrite "^(.*)-m-([0-9]+).html" /index.php?main_page=index&manufacturers_id=$2&% last;
rewrite "^(.*)-pi-([0-9]+).html" /index.php?main_page=popup_image&pID=$2&% last;
rewrite "^(.*)-pr-([0-9]+).html" /index.php?main_page=product_reviews&products_id=$2&% last;
rewrite "^(.*)-pri-([0-9]+).html" /index.php?main_page=product_reviews_info&products_id=$2&% last;
rewrite "^(.*)-ezp-([0-9]+).html" /index.php?main_page=page&id=$2&% last;
rewrite ^/PriceRange/([0-9]+)/([0-9]+)$ /index.php?main_page=advanced_search_result&pfrom=$1&pto=$2 last;
rewrite ^/LowestPrice/([0-9]+)$ /index.php?main_page=advanced_search_result&pfrom=$1 last;
rewrite ^/HighestPrice/([0-9]+)$ /index.php?main_page=advanced_search_result&pto=$1 last;
rewrite ^/HeightRange/([0-9]+)$ /index.php?main_page=advanced_search_result&extra_height=$1 last;
rewrite ^/Material/([0-9]+)$ /index.php?main_page=advanced_search_result&doll_material=$1 last;
rewrite "^(.*)-i-([0-9]+).html" /index.php?main_page=info_manager&pages_id=$2&% last;
rewrite "^news/?" /index.php?main_page=news&% last;
rewrite "^news/rss.xml" /index.php?main_page=news_rss&% last;
rewrite "^news/archive/?" /index.php?main_page=news_archive&% last;
rewrite "^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html" /index.php?main_page=news&date=$1-$2-$3&% last;
rewrite "^news/archive/([0-9]{4})-([0-9]{2}).html" /index.php?main_page=news_archive&date=$1-$2&% last;
rewrite "^news/(.*)-a-([0-9]+)-comments.html" /index.php?main_page=news_comments&article_id=$2&% last;
rewrite "^news/(.*)-a-([0-9]+).html" /index.php?main_page=news_article&article_id=$2&% last;
rewrite "^(.*).html" /index.php?main_page=$1&% last;

======================分割线=============.htaccess对比=========================
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.xxxxx.com$ [NC]
RewriteRule ^(.*)$ https://www.xxxxx.com/$1 [L,R=301]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteRule ^(.)-c-([0-9_]+)/(.)-p-([0-9]+)(.*)$ index\.php?main_page=product_info&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-c-([0-9_]+)/(.)-pi-([0-9]+)(.*)$ index\.php?main_page=popup_image&pID=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-c-([0-9_]+)/(.)-pr-([0-9]+)(.*)$ index\.php?main_page=product_reviews&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-c-([0-9_]+)/(.)-pri-([0-9]+)(.*)$ index\.php?main_page=product_reviews_info&products_id=$4&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-p-([0-9]+)(.)$ index\.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-m-([0-9]+)(.)$ index\.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pi-([0-9]+)(.)$ index\.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pr-([0-9]+)(.)$ index\.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pri-([0-9]+)(.)$ index\.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-ezp-([0-9]+)(.)$ index\.php?main_page=page&id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-c-([0-9_]+)(.)$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]

=======================下载地址===============================
nginx.txt

声明:Windows 10 专业版|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - Zencart156c使用nginx的伪静态规则


Carpe Diem and Do what I like