Static analysis of the forum under Windows IIS

Source: Internet
Author: User
Tags filter html form iis ini zip access

The two-day study Discuz 4.1, and successfully upgraded the original Discuz 2.5 forum to the latest version, personal feeling this forum is really good.

My Discuz 4.1 was run under Apache+php+mysql, and the URL Rewrite was opened, and I found that most of the pages of the forum could be accessed using the static HTML address, which was really good, and Apache was really powerful, No wonder now with so many Apache sites.

Can IIS also implement this kind of static functionality, I know Helicon developed a Isapi_rewrite ISAPI program, can be implemented under IIS URL rewrite function, but I have not tried, two days after the following operation test to see how effective. In addition, the following discuz provided in the zip file Rewrite.dll is actually Helicon Isapi_rewrite program, I discuz as software developers Incredibly also pirated peer software regret.

Reference article: discuz!4.1.0 IIS Rewrite configuration method (transferred from Discuz member area)

discuz! URL static function is restricted by the server environment of the forum, before you turn on this function, please select the appropriate environment configuration method according to your Web server environment, the following IIS6 server configuration is provided below. Other servers (such as Apache,zeus) you can configure yourself according to the principle.

1, download IIS rewrite module: http://download.discuz.net/4.1.0/discuz_iis_rewrite.zip;

2, extract the compressed package to any directory, (such as: C:\Rewrite). Then open the Control Panel-Administrative Tools-IIS Information Services Manager-Web site-Your site-Properties. " In the ISAPI filter entry, click Add, the filter name is filled in Rewrite, and the executable file is C:\Rewrite\Rewrite.dll;

3, restart IIS can be effective.

With the above configuration, you can turn on the static functionality of the impact in the discuz!4.1.0 background, depending on your needs.

None: url static functionality is not enabled.

discuz! Archiver Static: When the forum enables Archiver function, all links within archiver are in *.html form.

Normal page static: to the Forum commonly used pages (such as forumdisplay.php, viewthread.php, viewpro.php, etc.) for the static URL of the conversion.

Archiver and ordinary pages are static: Archiver and forum common pages (such as forumdisplay.php, viewthread.php, viewpro.php, etc.) for static URL conversion.

Usage considerations:

You can control the URL static turn on or off and its working status through the discuz! option in the system setup, this feature has special requirements to the server environment, the independent host user needs to add the corresponding rewrite rule to the Web server, therefore needs the server authority to use; for the virtual host user, You need to ask your space service provider whether the space supports rewrite and whether it supports file resolution in the Site Directory. htaccess, only if these two conditions are met, the URL static function will take effect. After opening the URL static, some common links in the forum will become similar discuz/forum-1-1.html form, if your server environment is not supported or configured, access to these links will be "Web page can not display" error message, the forum will not be normal access. When an inaccessible phenomenon occurs, please enter the admin background, turn off URL static function, the forum can return to normal state.

There is also a Httpd.ini file in the compression package provided in this article, which is a configuration file for the rewrite rule. The content is as follows (no modification required):

[Isapi_rewrite]
# 3600 = 1 hour

Cacheclockrate 3600

Repeatlimit 32
# Protect Httpd.ini and Httpd.parse.errors files
# from accessing through HTTP
Rewriterule ^ (. *)/archiver/([a-z0-9\-]+\.html) $ $1/archiver/index\.php\?$2
Rewriterule ^ (. *)/forum-([0-9]+)-([0-9]+) \.html$ $1/forumdisplay\.php\?fid=$2&page=$3
Rewriterule ^ (. *)/thread-([0-9]+)-([0-9]+)-([0-9]+) \.html$$1/viewthread\.php\?tid=$2&extra=page\%3d$4& Page=$3
Rewriterule ^ (. *)/profile-(USERNAMEUID)-(. +) \.html$ $1/viewpro\.php\?$2=$3



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.