nop 2.0 - redirect /news.aspx to /news

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
I hacked my older site so that /news.aspx was the root news listing url, unlike the original design which used /news/story-name.aspx etc.

I'm now wanting to redirect /news.aspx to /news, but ive been fiddling around in the routes and backward compatability routing etc, but cant figure out how to make this work. it seems this url is caught by a route which silently redirects it back to the home page... and no matter how i try, i cant seem to get it to fire the right ones.

any insights into making this work? thanks !
12 years ago
Open \Presentation\Nop.Web\Controllers\BackwardCompatibility1XController.cs file and replace
case "newsarchive":
                    {
                        return RedirectToRoutePermanent("NewsArchive");
                    }

with
case "news":
                    {
                        return RedirectToRoutePermanent("NewsArchive");
                    }

P.S. I haven't tested it.
12 years ago
There is already another "news" item in the list... but it doesnt seem to fire this one either. I can add a trailing slash and it seems to fire it, but wont otherwise. This is a weird one!
12 years ago
the confusing part is, the GeneralRedirect method is never called when i try to reach /news.aspx. so somthing else is grabbing it, and failing, and sending to the home page. argh
12 years ago
argh. i think i know whats going one. redirect caching in IE. fiddler shows the request doesnt even include news.aspx in the request, so apparently IE is automatically remapping the /news.aspx to / ... ARGH redir caching bites again!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.