php - aspx website is migrated from virtual space to virtual space. A 404 error appears on the secondary page. What is the general solution? Or how to solve it?
黄舟
黄舟 2017-05-16 13:01:28
0
1
669

Hello everyone, my next question is about website migration. It is the space migration of the basic operator. The website is moved to another space and the web program is copied directly. There is no sqlserver database. It is confirmed that it supports url_rewrite. Now you can open the homepage and click on the secondary page. When a 404 error occurs, it turns out that there are pseudo-static rules written in web.config. This is what happened after the migration. I think there is a problem with pseudo-static. Is the path wrong or something? I don’t know how to solve this problem or what the solution is. What? ? Please help. Thank you O(∩_∩)O. I have a good impression of programming and Linux. How should beginners learn to develop? It’s for the website y=_=y

<!-- 1. URL rewriting -->
    </configSections>
    <RewriterConfig><!--3. URL rewriting rules-->
        <Rules>
            <RewriterRule>
                <LookFor>~/index.html</LookFor><!--Rewritten address-->
                <SendTo>~/Default.aspx</SendTo><!--The actual accessed URL address-->
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/introduce.html</LookFor>
                <SendTo>~/CompanyInfo.aspx</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/culture.html</LookFor>
                <SendTo>~/CompanyInfo1.aspx</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/contact.html</LookFor>
                <SendTo>~/CompanyInfo2.aspx</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Products.html</LookFor>
                <SendTo>~/ProductList.aspx</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Products-(\d+).html</LookFor>
                <SendTo>~/ProductList.aspx?TypeID=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Products.html?PName=(\D+)</LookFor>
                <SendTo>~/ProductList.aspx?PName=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/ProductIntroduct-(\d+).html</LookFor>
                <SendTo>~/ProductIntro.aspx?ProID=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/SuccessfulCase.html</LookFor>
                <SendTo>~/CaseList.aspx</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/SuccessfulCase-(\d+).html</LookFor>
                <SendTo>~/CaseList.aspx?ID=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/SuccessfulCase-P(\d+).html</LookFor>
                <SendTo>~/CaseList.aspx?page=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/SuccessfulCase-(\d+)-P(\d+).html</LookFor>
                <SendTo>~/CaseList.aspx?ID=$1&page=$2</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/SuccessfulContent-Num(\d+).html</LookFor>
                <SendTo>~/CaseIntro.aspx?ArticID=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/DownLoad.html</LookFor>
                <SendTo>~/softDownloading.aspx</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/DownLoad-(\d+).html</LookFor>
                <SendTo>~/softDownloading.aspx?down=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Solution.html</LookFor>
                <SendTo>~/SolutionPage.aspx</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/Solution-(\d+).html</LookFor>
                <SendTo>~/SolutionPage.aspx?solu=$1</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/AuthCode.html</LookFor>
                <SendTo>~/SecurityCode.ashx</SendTo>
            </RewriterRule>
            <RewriterRule>
                <LookFor>~/DownLoadCount.html</LookFor>
                <SendTo>~/DownNumber.ashx </SendTo>
            </RewriterRule>
        </Rules>
    </RewriterConfig>
    <appSettings/>
    <connectionStrings>
        <add name="HXKJNetDataConnectionString" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\HXKJNetData.mdb;User id=admin;Jet OLEDB:Database Password=hx888888;Persist Security Info=True " providerName="System.Data.OleDb"/>
        <add name="MovieConnectionString" connectionString="Data Source=.;Initial Catalog=Movie;Integrated Security=True" providerName="System.Data.SqlClient"/>
    </connectionStrings>
    <system.web>
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
淡淡烟草味

It seems that no one has answered

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template