Windows and Linux pseudo-static rule notation

Source: Internet
Author: User
    1. [Isapi_rewrite] #这句是启用伪装静态规则
    2. Rewriterule/([0-9]+). html/contents.php?w=$1 [i]
Copy Code

Any address that begins with a number goes to Contents.php?w=$1, which represents the content received by the preceding ([0-9]+), and the subsequent representation is case-insensitive.

So how do you use the alphabet:

    1. Rewriterule/([a-z]+). html/contents.php?w=$1 [i]
Copy Code

Just change the number to the letter range you want.

How to represent all character symbols:

  1. Rewriterule/tag_ (. *). html/search.php?s=$1 [i]
Copy Code

Second, the Linux pseudo-static file name is:. htaccess rules:

  1. Rewriteengine on #这句是启用伪装静态规则
  2. Rewriterule ([0-9]+). html$/contents.php?w=$1 [L,NC]
Copy Code

Any address that begins with a number goes to Contents.php?w=$1, which represents the content received by the preceding ([0-9]+), and the subsequent [L,NC] represents case-insensitive.

Letters are expressed in the same way as Windows

How to represent all character symbols:

  1. Rewriterule tag_ (. *). html$/search.php?s=$1 [L,NC]
Copy Code

Through the above method, I believe you already know how to use pseudo-static rules, just put the above files in the space root directory can, the above method, as long as the space support, any language, ASP,. NET, PHP, JSP can be used, pseudo-static can make the page URL looks refreshing, as for SEO, controversial, I don't know if it works.

  • 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.