Could you tell me a question about apacherewriterule?

Source: Internet
Author: User
Why? The following parameters are not included in the url. I don't know why & nbsp; the original urlPHPcodeRewriteRule asked an apache rewrite rule question.
A few days ago, I wrote a new url rule like a url rule, but I matched it with. html? The following parameters are not included in the url. why?
Original url
PHP code
  RewriteRule ^/mall(?:\/([a-zA-Z0-9]+)(?:-([a-zA-Z0-9]+)(?:-([a-zA-Z0-9]+)(?:-([a-zA-Z0-9]+))?)?)?(?:-web2_([a-zA-Z0-9]+))?)\.html?$ /rebategoods.php?class=$1&small_class=$2&third_class=$3&fourth_class=$4&website_py=$5&%1


I copied it

PHP code
  RewriteRule ^/search_(?:[^_]*)(?:\/([a-zA-Z0-9]+)(?:-([a-zA-Z0-9]+)(?:-([a-zA-Z0-9]+)(?:-([a-zA-Z0-9]+))?)?)?(?:-web2_([a-zA-Z0-9]+))?)\.html?$ /search.php?q=$1&class=$2&small_class=$3&third_class=$4&fourth_class=$5&website_py=$6&%1

The first website I typed

Http://buy.2345.com/mall/fuzhuang-nvzhuang-shangyi-txu.html? Order = 2 & minprice = & maxprice = & p = 1

The parameter is
Array ([class] => fuzhuang [small_class] => nvzhuang [third_class] => shangyi [fourth_class] => txu [website_py] => [order] => 2 [minprice] => [maxprice] => [p] => 1)

My website:

Http://buy.2345.com/search_aaa/fuzhuang-nvzhuang-shangyi-txu.html? Order = 2 & minprice = & maxprice = & p = 1

However, only
Array ([q] => fuzhuang [class] => nvzhuang [small_class] => shangyi [third_class] => txu [fourth_class] => [website_py] =>)
The question mark is not passed in. why?

------ Solution --------------------
Lz nb, worship
------ Solution --------------------

------ Solution --------------------
This regular expression is too long. Is it true that the RewriteCond does not give the query to C.

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.