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" ) |