Products » Support Forums 

Support Forums

HomeHomeDotNetNuke Modu...DotNetNuke Modu...Url MasterUrl Master301 redirects on .htm and .html not working301 redirects on .htm and .html not working
Previous
 
Next
New Post
12/10/2009 8:23 PM
 

I’m trying to get .htm/.html redirection working and having problems.

I’m using IIS6, DNN 5.1.4 and URLmaster 1.15.

In web.config I added...

    <httpHandlers>
        ...
        <add verb="*" path="*.htm" type="System.Web.UI.PageHandlerFactory" />
        <add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory" />
        ...
    </httpHandlers>

In IIS6 I added .htm and .html pointing to ... C:\Windows\Microsoft.NET\FRAMEWORK\V2.0.50727\aspnet_isapi.dll ... and ensured “Verify that file exists” is not clicked.

In IIS6 does it matter what the “Custom Errors” 404 entry is ... mine points so “/Default.aspx”?

In “Advanced Regex Filters” I removed .htm and .html.

I tested the redirection in “Test Url Rewriting and Redirecting Functions” and it works and gets a 301.

However, I still get a 404 error – it’s as if URLmaster is not getting a look in and it’s being rejected by IIS.

I know I’ve missed something! Any ideas?
 

 
New Post
12/11/2009 2:44 AM
 

If you're getting an IIS 404, and the urls are working in the 'test url rewriting and redirecting' section, then the problem is most likely to be where you have mapped the asp.net runtime to the .htm requests.  You're correct in that Url Master is not getting a look in and the request is getting handled (and rejected) by IIS.

I wouldn't have thought the 'custom errors' file points matters, but you could try changing it and seeing if you still get the problem.

My suggestion would be to go back and double check all your changes.  Perhaps you made the configuration changes on the wrong website or virtual directory? 

 
New Post
12/11/2009 11:29 AM
 

After some trial and error (mostly error) I found the offending line in web.config...

     <customErrors mode="RemoteOnly" defaultRedirect="/Default.aspx" />

... I set this ages ago – well before installing URLmaster. Removing the line means that URLmaster is now seeing the requests and does 301 the specific URLs that I enter.

However, I’m still getting 404s for URLs that I haven’t added to URLmaster. I have the “Action for Pages which have been deleted, disabled or have expired” = “301 redirect to site Home Page” ... but it’s not doing that - I just get 404 in the browser.

Any ideas?
 

 
New Post
12/11/2009 11:34 AM
 

Ok, that's interesting.  I don't know why that error handler would stop your site from working, but at least you've found the problem.

To clarify: "Action for Pages which have been deleted, disabled or have expired: - this means any DNN pages which still actually exist, but have been deleted (and are still in the recycle bin) disabled (enabled checkbox marked 'off') or have expired (the expiry date has passed for the page).  In all cases the DNN page record still exists.

If you have emptied the recycle bin of a page, then it's not going to redirect unless you manually create a 301 redirect record for the specific Url.

 
Previous
 
Next
HomeHomeDotNetNuke Modu...DotNetNuke Modu...Url MasterUrl Master301 redirects on .htm and .html not working301 redirects on .htm and .html not working


Support Guidelines.. Please read before posting

To get support on iFinity products and services, please search the forums for the the answer to the problem you are seeking. If you cannot find a solution, post a question in the relevant forum.   Ensure that you specify the relevant versions of the problem, and the actual error message or a detailed description of the problem.    You will need to register with this site to post on the forum.  If you have a Microsoft Live (Hotmail/Passport) account you can use that.  If you have a Open Id account you can use that.  If you neither of these, you will need to register a user Id and password.

Please note : If you are posting a new thread for the Url Master module, please include the following information where applicable:

- Url Master version

- DotNetNuke version

- Example Url where possible

- If there is an error, please post the full error text and/or stack trace (from the DotNetNuke event log).