tags:

views:

24

answers:

1
+1  Q: 

Directory redirect

Ok, I don't know if this is possible.. Let me explain my situation.

I currently have a DotNetNuke framework and I am trying to get off of it. Only way to get approved is to build a new framework that sits beside the DNN and slowly migrate the functionality out of DNN and onto the new framework.

I don't want to have two different frameworks sitting on the same instance for maintainability purposes, I envision the DNN framework sitting in one and the new framework sitting in another but still maintaining the URL structure.

For example, www.url.com points to the DNN and if someone tries to resolve a page within a specified directory I want IIS to resolve from the other framework in another instance.

Is this possible?

A: 

You can use either IIS or ASP to redirect a webpage.

http://www.webconfs.com/how-to-redirect-a-webpage.php

<script runat="server">
private void Page_Load(object sender, System.EventArgs e) {
  Response.Status = "301 Moved Permanently";
  Response.AddHeader("Location","http://www.new-url.com");
}
</script> 

EDIT: You can also try URL Rewrite

Robert Greiner
301 redirect wont work because I have to maintain the same URL... www.url.com/dir_a/page_a.aspx points to one website instance, www.url.com/dir_b/page_b.aspx points to another website instance
BoredOfBinary
ah, see edits. That should work out for you.
Robert Greiner
Thats the conclusion I came up with... Since we are using IIS6, may have to edit the current ISAPI filter. I was hoping for another route since our ISAPI is in C++ and I have to offshore it. Thanks!
BoredOfBinary
ugh, that's rough. Did you consider upgrading to IIS7?
Robert Greiner
yeah, I have am setting a meeting up with my COO... That is what I am leaning towards...
BoredOfBinary
excellent, good luck!
Robert Greiner