Rewrite Rules for WordPress and Discuz in lighttpd

Source: Internet
Author: User

We need to enable rewrite Pseudo-static

Specific operation method: log on to the KLOXO background, expand the domain name in sequence, install the WP domain name, script, and lighttpd address rewrite rule, then fill in the above rule in the input box on the right, update, after completion, remember to restart lighttpd in the service. As shown in the following figure:

After configuration, restart lighttpd. Now you can add rules.

Wordpress rules

The code is as follows: Copy code

Url. rewrite = (
"^/(Wp-. + ).*/? "=>" $0 ",
"^/(Sitemap. xml)" => "$0 ",
"^/(Xmlrpc. php)" => "$0 ",
"^/(. + )/? $ "=>"/Index. php/$1"
 )


Rewrite (pseudo static) rules of Discuz under lighttpd:

The code is as follows: Copy code

Url. rewrite-once = (
"^/Archiver/(fid | tid0000-0000w-00000000.html) $" => "archiver/index. php? $1 ",
"^/Forum-(%0-9%%%%-(%0-9%%%%%.html $" => "forumdisplay. php? Fid = $1 & page = $2 ",
"^/Thread-(0-9000000000000-(0-9000000000000-(0-90000000000000000.html $" => "viewthread. php? Tid = $1 & extra = page = $3 & page = $2 ",
"^/Space-(username | uid316-(.20.0000.html $" => "space. php? $1 = $2 ",
"^/Tag-(.20.20..html $" => "tag. php? Name = $1"
 )

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.