Nginx URL rewrite Ecshop case

Source: Internet
Author: User

one: URL rewrite ecshop case

Rewrite syntax rewrite the position pattern after the regular expression is directed goods-3.html---->goods.php?goods_id=3Goods-([\d]+) \.html---> goods.php?goods_id =$1 Location/Ecshop {Index index.Php;rewrite Goods-([\d]+) \.html$/ecshop/goods.php?id=$1; rewrite article-([\d]+) \.html$/ecshop/article.php?id=$1; rewrite category-(\d+)-B (\d+) \.html/ecshop/category.php?id=$1&brand=$2; rewrite category-(\d+)-B (\d+)-min(\d+)-Max(\d+)-attr ([\d\.] +) \.html/ecshop/category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5; rewrite category-(\d+)-B (\d+)-min(\d+)-Max(\d+)-attr ([\d+\.]) -(\d+)-([^-]+)-([^-]+) \.html/ecshop/category.php?id=$1&brand=$2&price_min=$3&price_max=$4& filter_attr=$5&page=$6&Sort=$7&order=$8;} Note: In the case of a URL rewrite, if there is "{}" in the regular, it is wrapped in double quotation marks.

Nginx URL rewrite Ecshop case

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.