Learn how to write Mod Rewrite and access in Apache

Source: Internet
Author: User

Mod Rewrite of Apache
Rewriteengine on rewritebase/B2B/website/rewriterule ^ article-([0-9] +) \. html $ view_details.php? Browse = Profile & id = $1
The above tests passed. If it doesn't work, the key is the server side. How can we change it in the future?
You can add a/503 (ID)/title.htm to the image. You can use 503 or other numbers or ABC to do the same. It is not ideal even if you think of oabc, learning II, he just defines all the functions with numbers.

this useful reference

rewriteengine on
rewriterule ^ (. *)/archiver/(FID | tid)-[\ W \-] + \. html) $1/archiver/index. PHP? $2
rewriterule ^ (. *)/Forum-([0-9] +)-([0-9] + )\. HTML $1/Forumdisplay. PHP? FID = $2 & page = $3
rewriterule ^ (. *)/thread-([0-9] +)-([0-9] +)-([0-9] + )\. HTML $1/viewthread. PHP? Tid = $2 & extra = Page \ % 3d $4 & page = $3
rewriterule ^ (. *)/space-(username | UID )-(. + )\. HTML $1/space. PHP? $2 = $3
rewriterule ^ (. *)/Tag-(. +) \. html $1/Tag. php? Name = $2

discuz's
strongest WordPress
# begin WordPress

rewriteengine on
rewritebase/
rewritecond % {request_filename }! -F
rewritecond % {request_filename }! -D
rewriterule. /index. PHP [l]

# End WordPress
the key is to see how % is used. [...]

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.