Home  >  Article  >  Backend Development  >  Bo-Blog's dedicated IIS Rewrite program for Windows servers_PHP tutorial

Bo-Blog's dedicated IIS Rewrite program for Windows servers_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 15:54:35813browse

This article will provide a solution for Bo-Blog users to implement URL Rewrite on a Windows IIS 5.1/6.0 server. The advantage of this solution is that it does not require any component support and does not need to install an ISAPI filter (there are many online, but the best ones are not free); the disadvantage is that just like implementing rewrite through an ISAPI filter, it also requires IIS management at the beginning. staff’s help.

The implementation method is as follows:

A Download the attachment, open the iisrewrite.php file in it with a text editor, and change the beginning:
$blogdir='blog/';
Change to the installation directory of bo-blog. For example
$blogdir='weblog/';
(if installed in the root directory, write $blogdir=''; otherwise, add a slash at the end of the path as in the above example)
and then add this The file is uploaded to the wwwroot of the website.

Note: The rewrite rules contained in this file are suitable for versions 2.1.0 beta and above. 2.0.3 sp1 is not applicable.

B Run IIS Admin, as shown in the figure, and make corresponding settings for the website that needs to be rewritten. In the custom error menu, find the "404" error option, edit its properties, and set the message type to: URL (important, it must be set to URL, otherwise it will cause the server to give a 404 response to a page that does not exist, and set it to After the URL, the HTTP response of the rewritten page is normal 200). The address is set to /iisrewrite.php.
Bo-Blog's dedicated IIS Rewrite program for Windows servers_PHP tutorial

C Go to the blog backend and set the URL optimization method to "Apache URL Rewrite". At this point you can use the program's url rewrite function just like an Apache user.

Currently, this site’s temporary blog has such settings.
Local download

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318443.htmlTechArticleThis article will provide a solution for Bo-Blog users to implement URL Rewrite on a Windows IIS 5.1/6.0 server. The advantage of this solution is that it does not require any component support and does not need to install an ISAPI filter (network...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn