|
|
|
|
| Author |
Messages |
|
Ade Allen Registered Users
 Nuke Super Newbie Posts:12

 |
| 2/15/2007 2:39 AM |
|
Hi Scott,
I'm using the Human Friendly url provider with DNN 4.4.1 and a few custom modifications, and it's working great, many thanks.
I'm attempting to modify UrlRewrite to intercept requests to some legacy .htm pages, and have hit a bit of a wall.
I've successfully configured IIS and Web.Config so that .NET processes .htm files, and tested this works by renaming an .aspx page to .htm (and .htm.vb). All good so far, .htm pages are being processed just like .aspx pages.
I've successfully extended the UrlRewrite.vb with 2 new methods for identifying by product name (see http://www.golfalot.net/driver-reviews.aspx and http://www.golfalot.net/course-list.aspx?Region=South%2bWales).
Now I'm attempting to add another method (IndentifyByLegacyUrl), where I was hoping add all the redirects for the legacy htm pages.The golf_shop.aspx gets intercepted, and redirected, but the golf_shop.htm doesn't.
Web.Config httpHandlers section:
Web.Config buildProviders section:
I'm thinking that maybe the System.Web.UI.PageHandlerFactory is somehow bypassing the UrlRewrite, do you think could this be the problem, or is there something else I'm missing?
Any advice would be appreciated,
Ade. |
|
|
|
|
Ade Allen Registered Users
 Nuke Super Newbie Posts:12

 |
| 2/15/2007 2:40 AM |
|
Eek, the < code > section didn't quite do what I expected, sorry.
Try again:
Dim splitUrl() As String = url.Split(Convert.ToChar("/"))
If splitUrl.Length > 1 Then Select Case splitUrl(1) Case "golf_shop.aspx" RewriterUtils.RewriteUrl(app.Context, "~/" & glbDefaultPage & "?TabID=63") Return True Case "golf_shop.htm" RewriterUtils.RewriteUrl(app.Context, "~/" & glbDefaultPage & "?TabID=63") Return True Case Else Return False End Select Else Return False End If |
|
|
|
|
Ade Allen Registered Users
 Nuke Super Newbie Posts:12

 |
| 2/15/2007 3:52 AM |
|
Little update: I've decided to take a different approach, and kill 2 birds with 1 stone by adding the legacy redirect functionality to a custom 404 handler instead.
Far easier, no messing the IIS scriptmaps :) |
|
|
|
|
Scott McCulloch Administrators
 Nuke Master Posts:11386


 |
| 2/15/2007 2:46 PM |
|
| OK, good job, you done what I would ha ve tried anyway. |
|
Scott McCulloch Site Administrator |
|
|
Ade Allen Registered Users
 Nuke Super Newbie Posts:12

 |
| 2/16/2007 1:21 AM |
|
| Thanks Scott, for the vote of confidence in my method :) |
|
|
|
|
|
| You are not authorized to post a reply. |
|
|
|
ActiveForums 3.7
|
|
|