Discuz X2 static site URL (modify Rewrite Rules for The. htaccess file)

Source: Internet
Author: User
# Enable rewriteengine on in rewriteengine mode # Modify/discuz in the following statement to your forum directory address. If the program is placed in the root directory, please change/discuz to/rewritebase/discuz # rewrite system rule. Do not modify rewritecond % {QUERY_STRING} ^ (. *) $ rewriterule ^ topic -(. + )\. HTML $ portal. PHP? MoD = TOPIC & topic = $1 & % 1 rewritecond % {QUERY_STRING} ^ (. *) $ rewriterule ^ article-([0-9] +)-([0-9] + )\. HTML $ portal. PHP? MoD = view & Aid = $1 & page = $2 & % 1 rewritecond % {QUERY_STRING} ^ (. *) $ rewriterule ^ Forum-(\ W +)-([0-9] + )\. HTML $ forum. PHP? MoD = Forumdisplay & FID = $1 & page = $2 & % 1 rewritecond % {QUERY_STRING} ^ (. *) $ rewriterule ^ thread-([0-9] +)-([0-9] +)-([0-9] + )\. HTML $ forum. PHP? MoD = viewthread & tid = $1 & extra = Page \ % 3d $3 & page = $2 & % 1 rewritecond % {QUERY_STRING} ^ (. *) $ rewriterule ^ Group-([0-9] +)-([0-9] + )\. HTML $ forum. PHP? MoD = Group & FID = $1 & page = $2 & % 1 rewritecond % {QUERY_STRING} ^ (. *) $ rewriterule ^ space-(username | UID )-(. + )\. HTML $ home. PHP? MoD = Space & $1 = $2 & % 1 rewritecond % {QUERY_STRING} ^ (. *) $ rewriterule ^ blog-([0-9] +)-([0-9] + )\. HTML $ home. PHP? MoD = Space & uid = $1 & Do = Blog & id = $2 & % 1 rewritecond % {QUERY_STRING} ^ (. *) $ rewriterule ^ archiver/(FID | tid)-([0-9] + )\. HTML $ archiver/index. PHP? Action = $1 & value = $2 & % 1

1. This isApache Web Server (Virtual Host user ),Note: Modify rewritebase and save it as. htaccess.

2. upload to the directory where your discuz program is located

3. Modify discuz x2-seo settings-select available for all items, and select no for rewrite compatibility.

The preceding settings are for hawkhost.

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.