Typecho program pseudo static rule encyclopedia (including linux/windows) _linux

Source: Internet
Author: User
Although the old left blog is used in the WordPress program, but I have to say that WP program even if it is a very good one, but the problem in the resource occupancy is relatively poor. If you use the WP program to create a blog should know that when the site visits to hundreds of of the general host CPU will be exceeded, and even the suspension of the host to use. Because the general host product CPU limit for 5-10%, so it is easy to exceed the standard. Typecho Blog Program is developed by the people, although not currently updated but the function is basically perfect, the structure looks like WordPress, but in the use of resources than WP much better. So the Typecho user is still very much.

Typecho program's pseudo static rules are different from WP direct default available, we need to manually load into space before it can take effect. The following old left collation of the program in different host environment pseudo static rules, I hope to help.

1, the Linux Apache environment (. htaccess):
Copy Code code as follows:

<ifmodule mod_rewrite.c>
Rewriteengine on
# below is the root directory, the folder to modify the path, such as/laozuo/
Rewritebase/
Rewritecond%{request_filename}!-f
Rewritecond%{request_filename}!-d
Rewriterule ^ (. *) $/index.php/$1 [L]

# with the WWW jump to not take the
Rewritecond%{http_host} ^www.laozuo.org
Rewriterule (. *) http://laozuo.org/$1 [r=301,l]

# skip to band without www
Rewritecond%{http_host} ^laozuo.org
Rewriterule (. *) http://www.laozuo.org/$1 [r=301,l]
</IfModule>

2. Linux Apache Environment (Nginx):
Copy Code code as follows:

Location/{
Index index.html index.php;
if (-f $request _filename/index.html) {
Rewrite (. *) $1/index.html break;
}
if (-f $request _filename/index.php) {
Rewrite (. *) $1/index.php;
}
if (!-f $request _filename) {
Rewrite (. *)/index.php;
}
}

3. Windows IIS pseudo static (Httpd.ini):
Copy Code code as follows:

[Isapi_rewrite]
# 3600 = 1 hour
Cacheclockrate 3600
Repeatlimit 32
# Chinese Tag Solution
rewriterule/tag/(. *)/index\.php\?tag=$1
# Sitemapxml
Rewriterule/sitemap.xml/sitemap.xml [L]
Rewriterule/favicon.ico/favicon.ico [L]
# content Page
Rewriterule/(. *). html/index.php/$1.html [L]
# comments
Rewriterule/(. *)/comment/index.php/$1/comment [L]
# category page
rewriterule/category/(. *)/index.php/category/$1 [L]
# page Pagination
rewriterule/page/(. *)/index.php/page/$1 [L]
# search Page
rewriterule/search/(. *)/index.php/search/$1 [L]
# Feed
rewriterule/feed/(. *)/index.php/feed/$1 [L]
# Date Archive
REWRITERULE/2 (. *)/index.php/2$1 [L]
# Upload pictures and so on
Rewriterule/action (. *)/index.php/action$1 [L]

Because the old left only Apache space, so the test is no problem, other environments have friends can test, if you encounter problems can give me a message.

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.