directory url redirection

Mar 11, 2015 at 2:02 PM
Hi Friends:

Love the module, thank you! (can't believe something so fundamental isn't a part of the core open dnn framework).

Is there a way to have directories intercepted? for example: let's say i have an old site url that no longer exists. /mydirector/directory/ and I enter that with a 301 to be redirected to a page. It doesn't redirect, but throws a 404.

So it seems as if urlredirection works with .htm and .html pages, but not directory references.

Is ther a way to configure this to 301 redirect a directory?
Coordinator
Mar 12, 2015 at 2:27 PM
Hi

Thanks! The UX actually does exist in the Evoq paid product, although it more integrated into the platform. For example, yu can set all the alternate page URL on the actual page settings rather than having to go a dedicated 'URL Management; page in the Admin section. I just replicated the functionality as a free module.

As for you question, I was able to get it to work pretty easy so maybe I'm not understanding the issue.

As a test, I created a folder under the root called "OldFolder" and I put a html file in there called index.htm.

I can browse to "/oldfolder/index.htm' and see the file. I then tried going to "/oldfolder" and I get redirected to the DNN 404 page as I expected.

Then I created a new page in DNN and went into the URL Management UX and added a custom URL "/oldfolder" for the new page. Now when I go to "/oldfolder", I get redirected to my new page instead of getting a 404.

Is that what you were trying to do?
Mar 12, 2015 at 2:36 PM
Hi Friend:

Thank you for your help.

We had an old static HTML site...www.mysite.com. This site was replaced using the same domain name on March 5th. When submitting the site to Google to crawl, it has been reporting that some pages and DIRECTORIES return 404s. That's because they don't exist anymore.

I was able to use the module to enable the .htm and .html pages to be redirected to the new pages in DNN. For example, my old site used to have www.mysite.com/products.htm and www.mysite.com/products.htm. I used the module to select the Products menu item in DNN, and added two URL rules to 301 /products.htm and products.html. Works great! (thank you!)

However, Google reports that there's missing DIRECTORIES. In crawl errors, i get that the old site used to have www.mysite.com/images2/ as a folder. I wanted to use the module to redirect the url www.mysite.com/images2/ to www.mysite.com/Gallery. So I used the module to select the Gallery Page. I added a 301 rule with the url /images2/

When I browse to that url ...www.mysite.com/images2/ it still throws a 404.

So what I'm trying to figure out is how to deal with url redirection when it's referencing a directory. In this case, /images2/, and not an individual page.

I think what you are saying is that I actually need to make that folder, /images2/ and put an index.html file in there in order for this to work.

(there is no /images2/ folder, nor /images2/index.html. Those files no longer exist).
Mar 12, 2015 at 3:06 PM
Ok. That worked. Thank you very much.