Hiển thị kết quả từ 1 đến 7 / 7
  1. #1
    Tham gia
    28-11-2008
    Bài viết
    1,847
    Like
    31
    Thanked 38 Times in 36 Posts

    Muốn bỏ rewrite cho website

    Hiện mình có site bị lỗi rewrite trên windows 2k3 trên 2k8 thì bình thường.
    Nhưng 1 số lý do không chạy được trên 2k8 nên cần bỏ phần config rewrite để chạy trên 2k3

    Đây là file web.config
    <?xml version="1.0"?>
    <configuration>
    <configSections>
    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensions SectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGro up, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptReso urceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebService sSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerial izationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
    <section name="profileService" type="System.Web.Configuration.ScriptingProfileSer viceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthentica tionServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
    </sectionGroup>
    </sectionGroup>
    </sectionGroup>
    <section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" allowDefinition="MachineToApplication" restartOnExternalChanges="true" requirePermission="false" />
    <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.Rewr iterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
    </configSections>

    <rewriter>

    <rewrite url="/(.+)/(.+)/documentdownload.html" to="/Web/gami_document.aspx?lang=$1&amp;projectid=$2" processing="stop"/>

    <!--Gửi cho bạn bè-->
    <rewrite url="/(.+)/(.+)/sendemail.html" to="/Web/SendEmail.aspx?lang=$1&amp;url=$2" processing="stop"/>

    <rewrite url="/(.+)/(.+)/print.html" to="/Web/Print.aspx?lang=$1&amp;newsid=$2" processing="stop"/>


    <rewrite url="/(.+)/Default.html" to="/Web/Default.aspx?lang=$1" processing="stop"/>
    <rewrite url="/(.+)/(.+)/.html" to="/Web/Default.aspx?lang=$1&amp;zonename=$2" processing="stop"/>
    <rewrite url="/Default.html" to="/Web/Default.aspx" processing="stop"/>
    <!--Link đến giỏ hàng-->
    <rewrite url="/giohang/ecomviet.html" to="/Web/View.aspx" processing="stop" />
    <rewrite url="/(.+)/(.+)/(.+)/(.+)/(.+)/ecomviet.html" to="/Web/View.aspx?lang=$1&amp;zonename=$2&amp;subzonename= $3&amp;subzonename_un=$4&amp;subzonename_uns=$5" processing="stop" />
    <rewrite url="/(.+)/(.+)/(.+)/(.+)/ecomviet.html" to="/Web/View.aspx?lang=$1&amp;zonename=$2&amp;subzonename= $3&amp;subzonename_un=$4" processing="stop" />
    <rewrite url="/(.+)/(.+)/(.+)/ecomviet.html" to="/Web/View.aspx?lang=$1&amp;zonename=$2&amp;subzonename= $3" processing="stop" />
    <rewrite url="/(.+)/(.+)/ecomviet.html" to="/Web/View.aspx?lang=$1&amp;zonename=$2" processing="stop" />
    <rewrite url="/(.+)/(.+)/(.+)/(.+)/(.+)/(.+).html" to="/Web/View.aspx?lang=$1&amp;zonename=$2&amp;subzonename= $3&amp;subzonename_un=$4&amp;subzonename_uns=$5&am p;newsname=$6" processing="stop" />
    <rewrite url="/(.+)/(.+)/(.+)/(.+)/(.+).html" to="/Web/View.aspx?lang=$1&amp;zonename=$2&amp;subzonename= $3&amp;subzonename_un=$4&amp;newsname=$5" processing="stop" />
    <rewrite url="/(.+)/(.+)/(.+)/(.+).html" to="/Web/View.aspx?lang=$1&amp;zonename=$2&amp;subzonename= $3&amp;newsname=$4" processing="stop" />
    <rewrite url="/(.+)/(.+)/(.+).html" to="/Web/View.aspx?lang=$1&amp;zonename=$2&amp;newsname=$3" processing="stop" />
    <rewrite url="/(.+)/(.+).html" to="/Web/View.aspx?lang=$1&amp;newsname=$2" processing="stop" />




    </rewriter>

    <appSettings>


    <add key="ConnectionString" value="...." />


    <add key="Default_Language" value="vi-VN" />
    <add key="Default_Language_Website" value="vi-VN" />
    <add key="ControlNameDetail" value="detail" />
    <add key="UploadPath" value="/Upload/" />
    <!--Thiết lập hiển thì trọng tài trong nước hay nước ngoài-->
    <add key="Get_Default_Arbitrator" value="vn" />
    <add key="Get_Default_Arbitrator_US" value="vn" />
    <add key="backupPath" value="/Administrator/backupPath/" />
    <add key="downloadpath" value="/Administrator/downloadPath/" />
    <add key="databasename" value="piac" />
    <add key="fileOriName" value="backup_ db_piac.bak" />
    <add key="UploadProduct" value="/Upload/Products/" />
    <add key="ControlNameLawDatabase" value="DocumentList" />
    <!--Thoi gian trong Cache-->
    <add key="CacheExpire" value="3" />
    </appSettings>
    <connectionStrings>

    </connectionStrings>
    <system.webServer>
    <handlers>
    <remove name="WebServiceHandlerFactory-Integrated" />

    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFact ory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFact ory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
    <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" />
    <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" />
    <add name="Telerik.Web.UI.DialogHandler" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" />
    </handlers>
    <modules runAllManagedModulesForAllRequests="true">
    <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule " />
    </modules>
    <validation validateIntegratedModeConfiguration="false" />
    </system.webServer>
    <system.web>
    <pages>
    <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
    <add tagPrefix="ext" namespace="Coolite.Ext.Web" assembly="Coolite.Ext.Web" />
    </controls>
    </pages>
    <customErrors mode="Off" />
    <compilation debug="true">
    <assemblies>
    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    <!--<add assembly="Telerik.Charting, Version=2.0.4.0, Culture=neutral, PublicKeyToken=D14F3DCC8E3E8763"/>-->
    </assemblies>
    </compilation>
    <httpHandlers>
    <remove path="*.asmx" verb="*" />
    <add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFact ory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
    <add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFact ory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
    <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false" />
    <add path="*/coolite.axd" verb="*" type="Coolite.Ext.Web.ResourceManager" validate="false" />
    <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
    <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
    </httpHandlers>
    <authentication mode="Forms">
    <forms name=".ASPXAUTH" path="/" timeout="30">
    </forms>
    </authentication>
    <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
    <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
    <httpModules>
    <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule , Intelligencia.UrlRewriter" />
    <add name="HttpModule" type="TimeUniversal.Library.HttpModule, TimeUniversal.Library" />
    </httpModules>
    <xhtmlConformance mode="Transitional" />
    </system.web>
    </configuration>
    Quote Quote

  2. #2
    Tham gia
    15-01-2009
    Location
    tp Hồ CHí Minh
    Bài viết
    224
    Like
    2
    Thanked 8 Times in 8 Posts
    Bạn cần làm 2 thao tác

    1. Thay đổi các link về đúng link chưa rewrite
    2. Bỏ rewrite config được lưu trong file web.config

  3. #3
    Tham gia
    28-11-2008
    Bài viết
    1,847
    Like
    31
    Thanked 38 Times in 36 Posts
    Quote Được gửi bởi dxt49 View Post
    Bạn cần làm 2 thao tác

    1. Thay đổi các link về đúng link chưa rewrite
    2. Bỏ rewrite config được lưu trong file web.config
    Bác có thể hướng dẫn qua theo file web.config ở trên không.

    Thật sự là về lập trình mình mù tịt.

  4. #4
    Tham gia
    15-11-2005
    Location
    Hà Nội
    Bài viết
    696
    Like
    0
    Thanked 14 Times in 12 Posts

    ASP.NET Rewrite URL

    Tùy theo phần lập trình như thế nào mới bỏ được bạn ah. Mình nghĩ là bạn cài đặt thiếu nên không chạy được.

    Bạn có thể tham khảo một số link sau xem:
    Rewrite URL trong ASP.NET 4.0 bằng Routing
    Cách rewrite url động trong asp.net mvc 3

    Bạn nên hỏi ở diễn đàn chuyên lập trình C# sẽ tốt hơn

  5. Thành viên Like bài viết này:


  6. #5
    Tham gia
    25-01-2011
    Location
    Hà Nội
    Bài viết
    1,850
    Like
    55
    Thanked 171 Times in 131 Posts
    Gửi cả source lên mới sửa được chứ

  7. #6
    Tham gia
    28-11-2008
    Bài viết
    1,847
    Like
    31
    Thanked 38 Times in 36 Posts
    Quote Được gửi bởi Than Dieu View Post
    Tùy theo phần lập trình như thế nào mới bỏ được bạn ah. Mình nghĩ là bạn cài đặt thiếu nên không chạy được.

    Bạn có thể tham khảo một số link sau xem:
    Rewrite URL trong ASP.NET 4.0 bằng Routing
    Cách rewrite url động trong asp.net mvc 3

    Bạn nên hỏi ở diễn đàn chuyên lập trình C# sẽ tốt hơn
    Có thể rewrite họ viết cho IIS 7 nên vẫn chạy được trên 2k8, 2k3 thì bị lỗi rewrite.

    Ở trên 2k8 thì nó bị lỗi Telerik khi up ảnh

    Được sửa bởi thanhtamntp lúc 11:37 ngày 26-12-2013

  8. #7
    Tham gia
    28-11-2008
    Bài viết
    1,847
    Like
    31
    Thanked 38 Times in 36 Posts
    Hiện mình đã fix được lỗi trên 2k8. Nên không cần bỏ rewrite để chạy trên 2k3 nữa

Bookmarks

Quy định

  • Bạn không thể tạo chủ đề mới
  • Bạn không thể trả lời bài viết
  • Bạn không thể gửi file đính kèm
  • Bạn không thể sửa bài viết của mình
  •