<html:link> <html:rewrite>区别

本文深入探讨了HTML中的<html:link>元素如何生成超链接,并通过<html:rewrite>元素来重写URL地址。重点阐述了两者在实际网页开发中的作用与区别,适合前端开发者学习。
<html:link> 生成的是一个超链接:
<a href="/StrutsMyself/RegUserUI.do?username%A0%">注册</a>

<html:rewrite>生成的是一个地址:
"/StrutsMyself/RegUserUI.do?username%A0%"
以下是网站目前的webconfig文件 改怎么修改 <?xml version="1.0" encoding="UTF-8"?> <!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=152368 --> <configuration> <connectionStrings> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings> <appSettings configProtectionProvider="RsaProtectedConfigurationProvider"> <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#"> <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" /> <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#"> <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" /> <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#"> <KeyName>Rsa Key</KeyName> </KeyInfo> <CipherData> <CipherValue>G+DsdRtaxe0KW7q0OXT2A2TaUpeiZtkWsxvozK3E5gCFiP2u +nz7kdqzzC9be6ODsipCEoLTOKove4o1LZ34Vpgf7xUBBhZD15Zq8DdazCyYHnrn3TO5AMzjQ6I5f7NYspz69dw1kx6fI6yLHc8nwvXkxLq0aI1VZtTcc 525An4T7e6N4KOuNTnDQCUKO+EJoJh4W7tISZ37ygGQGzSH747CMGXWx9ZsVcNz+Jtc+ot +cGt9Gm/A6+b2NeQd3IgRe3qooXb6V0Jdi/2wONuPJ1FVWXfsnQRFD0imJxzFk86ChKKWK1c0SWMsrqZhUi0w4aTD26T +QL77Bg4qQsRGsQ==</CipherValue> </CipherData> </EncryptedKey> </KeyInfo> <CipherData> <CipherValue>O+M +/jfmUYbauWytN4pGYc55ElmhWj8SMkZUJmmwJ9Zzpm46To5tsbKWamxHvdqemCvIa9zUITppIFTuDdeejMVHHpPsXHUUkTk602Z3Uph94+nBSXVn0Agx DhHzgCEmRrv/1nFfffr6z6YleY1oSxjFDbyghteTiG5ksdw9bsbyLByvE6Kzx6D9lOwhN1U6m5nltBwFeYGJ +HKV5ayk3yKc9NkRf7nhzYzscKf9T8N74iNLNUddMiKojFSj4KZl+exXDj0vWG5emWBxwUStlx8ebXsxILBvHZUUE8xVmNWnue6MfGu369mB +ilqWmQivTsmPQIiW228rDPQtAfH74zAuQUftU1LlpcMeGQnCGc999FZQaBsScOwub0RUu2GB4OD562EzahxNGgzlRvt4ZiRcPDi32AVlHR5AKWn/ZpZi fZdQOUzvW/e8lrOSrJc0Yzl/piERRf4qmyYglnrC/U6+H8oJ0mcD6yfPtdoMLfLcuQpuMuvpaPrSbOPxQaPxfeq+eFc+ +q0GpTj0cFndrgdK0o7a0NGjKyrcuYIKgOG6nnL5E9IPUoVZp/yycJLSVb0QybgnKn0IBRVZZHt3p4wMMS9VyNlsLnl+DD7TaU=</CipherValue> </CipherData> </EncryptedData> </appSettings> <system.web> <httpRuntime enableVersionHeader="false" requestValidationMode="2.0" executionTimeout="500" maxRequestLength="409600" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" /> <customErrors allowNestedErrors="true" defaultRedirect="http://www.huadonghospital.com/index.html" mode="On" /> <compilation debug="false" targetFramework="4.0"> <assemblies> <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </assemblies> </compilation> <authentication mode="Forms"> <forms loginUrl="~/Account/LogOn" timeout="2880" /> </authentication> <membership> <providers> <clear /> <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" /> </providers> </membership> <profile> <providers> <clear /> <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" /> </providers> </profile> <roleManager enabled="false"> <providers> <clear /> <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /> <add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /> </providers> </roleManager> <pages validateRequest="false"> <namespaces> <add namespace="System.Web.Helpers" /> <add namespace="System.Web.Mvc" /> <add namespace="System.Web.Mvc.Ajax" /> <add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Routing" /> <add namespace="System.Web.WebPages" /> </namespaces> </pages> <httpCookies httpOnlyCookies="true" /> <globalization requestEncoding="GB2312" responseEncoding="GB2312" uiCulture="zh-CN" culture="zh-CN" fileEncoding="GB2312" /> </system.web> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <staticContent> <clientCache cacheControlMode="DisableCache" /> </staticContent> <defaultDocument> <files> <clear /> <add value="index.html" /> </files> </defaultDocument> <httpProtocol> <customHeaders> <remove name="X-Powered-By" /> <add name="X-Frame-Options" value="SAMEORIGIN" /> </customHeaders> </httpProtocol> <httpErrors errorMode="DetailedLocalOnly"> <remove statusCode="404" /> <error statusCode="404" path="/index.html" responseMode="ExecuteURL" /> </httpErrors> <security> <requestFiltering> <verbs> <add verb="OPTIONS" allowed="false" /> <add verb="TRACE" allowed="false" /> </verbs> </requestFiltering> </security> <rewrite> <rules> <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" ignoreCase="true" /> </conditions> <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration>
最新发布
11-06
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值