Apache pseudo-static html (URL Rewrite) setting method

Source: Internet
Author: User
Tags apache configuration file html index php static

Open Apache's httpd.conf configuration file.
Two will #LoadModule rewrite_module modules / mod_rewrite in front of the three removed in httpd.conf add:
<IfModule mod_rewrite.c>
RewriteEngine On


#RewriteCond% {ENV: SCRIPT_URL} (?: Index | dispbbs) [- 0-9] +. Html
Php $ __ is_apache_rewrite = 1 & __ rewrite_arg = $ 2 (*: index | dispbbs)) - ([- 0-9] +). Html $ {GetProperty (Content)}.
</ IfModule>

Fourth, to achieve the asp post URL to the PHP post map, in the third step between <IfModule mod_rewrite.c> and </ IfModule> add:
RewriteMap tolowercase int: tolower
RewriteCond% {QUERY_STRING} (?: Boardid | page | id | replyid | star | skin) = d + [NC]
Asp $ {GetProperty (Content)}. Php? $ {Tolowercase:% {QUERY_STRING}} & __ is_apache_rewrite = 1 (*: index | dispbbs)

Save httpd.conf and restart Apache

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.