Use the rewrite rules of. htaccess to implement pseudo-static links of the discuz Forum

Source: Internet
Author: User

When "url Rewrite" is enabled in the background, everything looks normal. However, when you click a topic, the page of the Forum is still displayed. I looked at the Forum directory and found that there was no such directory. htaccess file, so the default usage is for the Godaddy host. htaccess, but the default rewrite rule for discuz will certainly not exist, so the following statement is added, everything is normal ~ CopyCodeThe Code is as follows: rewriteengine on
Rewritebase/
Rewriterule ^ archiver/([a-z0-9 \-] + \. html) $ archiver/index. php? $1
Rewriterule ^ Forum-([0-9] +)-([0-9] +) \. html $ Forumdisplay. php? FID = $1 & page = $2
Rewriterule ^ thread-([0-9] +)-([0-9] +)-([0-9] +) \. html $ viewthread. php? Tid = $1 & extra = Page \ % 3d $3 & page = $2
Rewriterule ^ profile-(username | UID)-(. +) \. html $ viewpro. php? $1 = $2
Rewriterule ^ space-(username | UID)-(. +) \. html $ space. php? $1 = $2
Rewriterule ^ tag-(. +) \. html $ tag. php? Name = $1

Note: The penultimate line is for discuz's supesite/X-space. I didn't install it, but I don't actually need it.

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.