Questions about regular expressions in. htaccess-php Tutorial

Source: Internet
Author: User
About. the problem with the regular expression in htaccess is. this RewriteRule & nbsp; ^ ([A-Za-z] +) ($) & nbsp; movieindex is written in htaccess. php? The effect achieved by entrance $1 is: www. ydutv. comDongzuopian & nbsp; enter the page www. ydutv about the regular expression in. htaccess.
In. htaccess
Write this sentence
RewriteRule ^ ([A-Za-z] +)/($) movie/index. php? Entrance = $1

The result is as follows:
Http://www.ydutv.com/Dongzuopian/ go to a page
Http://www.ydutv.com/Kongbupian/ go to a page
However, I want
When http://www.ydutv.com/search/, do not enter a page, but enter B page.
So I think it should be in RewriteRule ^ ([A-Za-z] +)/($) movie/index. php? Entrance = $1 what should I do if I exclude "search" in the red section? What if I want to exclude more than "search", such as adding an exclusion "play?

Share:


------ Solution --------------------
You can simply write the search statement in the first line.

The remaining two are written later.

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.