Results 1 to 2 of 2

Thread: aspx permanent redirect help please

  1. #1
    Join Date
    Dec 2010

    aspx permanent redirect help please


    I would like to redirect several aspx url's from website A to website B and then, if possible, redirect the remaining urls in a particular folder from website A to website B. Website A is .aspx and website B is .php.


    redirect all other url's from www.websiteA.com/folder/ to www.websiteB.com

    I have had a browse on some forums and have found that individual pages can be redirected using the following:

    <script runat="server">
    private void Page_Load(object sender, System.EventArgs e)
    Response.Status = "301 Moved Permanently";

    However, if the old pages are removed from Website A, then this won't work. Is it possible to add some code to the web.config file?

    I know almost nothing about aspx, so any help would be very much appreciated.

  2. #2
    Join Date
    Jan 2007
    Sure. You could also toss those rewrite commands into global.asax. Anywho, I think this is the solution in web.config.

    HTML Code:
     ... other stuff ...
            <rule name="redirect page X" stopProcessing="true">
              <match url="~/pagex.aspx" ignoreCase="true" />
              <action type="Redirect" url="http://othersite.com/pageZ.php" />
     ... possibly more other stuff ...
    Jon Wire

    thepointless.com | rounded corner generator

    I agree with Apple. Flash is just terrible.

    Use CODE tags!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center