LIGHTTPD Open rewrite pseudo static method

Source: Internet
Author: User
Tags vps

Recently has been recommended cheap VPS, you know, cheap VPS generally only 128MB, or 256MB memory, especially after the installation of Free Kloxo panel, we generally choose to switch Apache for LIGHTTPD to save memory.

However, the attendant problem comes, lighttpd is not supported. htaccess, so how do we configure rewrite pseudo static? After a circle on Google, finally successfully implemented LIGHTTPD pseudo static, we have to do is to write the rules to the LIGHTTPD configuration. Below, I take WordPress as an example, the next implementation method. First up rule:

The code is as follows Copy Code

Url.rewrite = (
"^/(wp-.+)." => "$",
"^/(sitemap.xml)" => "$",
"^/(xmlrpc.php)" => "$",
"^/(. +)/?$" => "/index.php/$1"
)

We login Kloxo backstage, expand the domain name in turn, install WP domain name, script, lighttpd address rewrite rules, and then fill in the above rules into the right input box, update, you can. The following figure:


When finished, remember to restart the LIGHTTPD in the service, this is very important! No reboot may be invalid!

"With DZ under LIGHTTPD open rewrite rules"

The code is as follows Copy Code

Url.rewrite-once = (
"^/archiver/((Fid|tid)-[w-]+.html) $" => "archiver/index.php?$1",
"^/forum-([0-9]+)-([0-9]+). html$" => "forumdisplay.php?fid=$1&page=$2",
"^/thread-([0-9]+)-([0-9]+)-([0-9]+). html$" => "viewthread.php?tid=$1&extra=page=$3&page=$2",
"^/space-(Username|uid)-(. +). html$" => "space.php?$1=$2",
"^/tag-(. +). html$" => "tag.php?name=$1"
)

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.