asp.net - How to redirect extension less URL using HttpHandlers/ HttpModules -
i want add dynamic routing or redirect website 1 can utilize multiple url same page. want implement dynamically same using global.asax, not able find regarding same topic.
below sample url , dummy table structure data holds multiple url same page.
can add dynamically routes global.asax
file
suppose if have multiple routes same page example
while actual url page http://website.com/en/about-us
.
my question is: there way can dynamically define these routes in global.asax
file in such way reads url entered users http://website.com/about
, compares database table , redirects correct page http://website.com/en/about-us
?
if option a not possible how can achieve same using httphandlers/httpmodules
. this link show configuration of httphandlers not actual code handler
taking consideration following table structure:
id url_name url actual_url page_handler 1 home http://website.com/ http://website.com/ default.aspx 2 http://website.com/about http://website.com/en/about-us about.aspx 3 http://website.com/about-us http://website.com/en/about-us about.aspx 4 http://website.com/en/about http://website.com/en/about-us about.aspx 5 contact http://website.com/contact http://website.com/en/contact-us contact.aspx 6 contact http://website.com/en/contact http://website.com/en/contact-us contact.aspx
i want asp.net webform based website
Comments
Post a Comment