Under IIS 7 and IIS 7.5. htaccess conversion to Web.config method

Source: Internet
Author: User
Tags config iis

The. htacess file is a pseudo static file under Apache, which is also effective in nginx environments, and is equally valid after simple setup; if it is Windows 2003, the program provider actually provides the pseudo static files below Apache and Windows 2003, We don't have to worry. If you are using IIS 7 or IIS 7.5, the following pseudo static file is a Web.config file, so how do you convert the. htacess file to a Web.config file?

This is the problem I encountered a few days ago, money to buy a program, the program provider did not provide web.config pseudo static file, to find him to, he said he did not know how to do it, I want to get it myself; I had to go to Taobao to find someone to make, casually found a store, asked, open asking for 200 yuan, are fast choking me, Less than 20 false static conversion incredibly to 200 yuan? For several shops, no one less than 150 yuan, so still feel oneself get!

Search the Internet to find a lot of information, and finally found a very simple solution, as long as a few minutes can be done, completely do not have to spend dozens of yuan or even hundreds of people to get. The solution to this method is the Urlrewrite plug-in, which is the address rewrite plug-in, after installation can be loaded into the IIS7 and IIS7.5 panel, we directly use the function of this plug-in can be converted to. htacess pseudo static files to. webconfig files.

Download Install Urlrewrite Plugin

This plug-in default is not integrated in IIS7 and 7.5 above, users to download the installation, the current version is the URL Rewrite 2.0, after the installation is completed, restart IIS 7 or IIS 7.5, select their own web site, you will see the Urlrewrite module, which is all in English. The installation method is simple, installed by default configuration, without modifying the address of the installation file.

Download Address: Http://www.iis.net/extensions/urlrewrite

Go to use Urlrewrite plugin

Go to Server Manager, select "Internet Information Services"-"Start Page"-"own website", which site to use pseudo static, then enter to which website, click the website name can enter the corresponding website Control Panel, select Urlrewrite module can, When you enter the Urlrewrite, you will see the whole English interface.

Convert. htacess pseudo static file

If you want to convert the. htacess pseudo static file, then select Import Mod_rewrite Rules, that is, the right side of the third line of black words below the option, click to enter, you will see the corresponding dialog box, we click on the right button above the input box, Select the. htacess pseudo static file, and then click on the import of the above input box can be imported, import, we will see in rewrite rules to import the successful pseudo static rule, select the right operation-application can be.

Conversion. webconfig file succeeded

IIS7 and IIS7.5 below is not supported directly with. htacess pseudo static files, pseudo static files are converted to Web.config files, in fact, after the import operation, we go to the site directory, will find the site Web.config file has a lot of pseudo static rules. What you are going to do is check whether the pseudo static rule is correct, theoretically, as long as it is labeled. htacess pseudo static file, then the import will be accurate.

The above operation takes only a few minutes, however, I looked for the relevant data, or spent several hours, so write this article, I would like to use IIS 7 and IIS 7.5 Webmaster Help; Of course, if the virtual host encounter pseudo static rules problem, directly contact the space business, the space Chamber of Commerce to deal with all the good. This article by 121 good Information (http://www.121h.com/) original, Welcome to reprint share, may wish to retain links, webmaster should help!

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.