How do you make a dynamic page static by using an ASP Web-developed website?

Source: Internet
Author: User

Use the ASP. NET-developed Web program to achieve static using URLRewriter.dll.
A. Download Urlrewriter.rar, unzip and place in/bin/directory
B. Add Urlrewriter.rar to the project reference.
C. Configure the IIS site to point to the handler aspnet_isapi.dll with the extension HTML.
IIS site, Properties---Home directory, configuration--add
Executable file and ASPX processing are the same, both are C:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll
In particular, be sure not to check whether the file exists.
D. Add the configuration content in Web. config, which is in the compressed package.
<configSections>
<section name= "Rewriterconfig"
Type= "URLRewriter.Config.RewriterConfigSerializerSectionHandler, Urlrewriter"/>
</configSections>
<!--actual redirection--
<RewriterConfig>
<Rules>
<RewriterRule>
<lookfor>~/(\d*) .html</lookfor>
<SendTo>~/user/default.aspx?link=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
<system.web>
<!--
Need to add HTML references in IIS to the ASPX reference
-
<add verb= "*" Path= "*.aspx"
Type= "Urlrewriter.rewriterfactoryhandler, Urlrewriter"/>
<add verb= "*" Path= "*.html"
Type= "Urlrewriter.rewriterfactoryhandler, Urlrewriter"/>
E. In the Address bar enter [Url][/url] point to [Url][/url]
4. Configuration of a static Apache Web server based on Apache HTTP Server (conf/httpd.conf)
A. Find LoadModule rewrite_module modules/mod_rewrite.so in the httpd.conf file
Usually the line is commented out and the "#" is removed. If not, increase the line.
B. Add code:
<ifmodule mod_rewrite.c>
Rewriteengine on
Rewriterule ^/([0-9]+). html$/user.php?user=$1
</IfModule>
C. If the Web site is defined by using a virtual host, be sure to add it to the virtual host profile. Htccess, or maybe
cannot be used.
D. Restart Apache and reload the configuration.
E. Enter [Url][/url] in the address bar, and actually point to [Url][/url]

How do you make a dynamic page static by using an ASP Web-developed website?

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.