Hi - What is the best way in DNN to set up a redirect so that any time someone browses to (for example) "http://www.mywebsite.com/..." they get redirected to "http://www.mywebsite.us/.." ?
Thanks
Tom
Thanks for your replies -
I am trying to do this in the web.config (on a test website), but when I add the [rewrite] tag, it breaks the website. I dont have any [httpProtocol] tag in my web.config. Does the [rewrite] tag need to go inside the [system.webServer] tag?
Yes, inside system.webserver.
Thanks Tycho - but I can't see any of you examples in your message
I appreciate your help with this
Posted By Tom Melkonian on 16 Jun 2020 12:49 PM Thanks for your replies - I am trying to do this in the web.config (on a test website), but when I add the [rewrite] tag, it breaks the website. I dont have any [httpProtocol] tag in my web.config. Does the [rewrite] tag need to go inside the [system.webServer] tag? Thanks
Please note that you must first install the Url Rwriter module or these lines will crash your site. https://www.iis.net/downl...icrosoft/url-rewrite
BTW, the DNN (IMO best) way of doing this would be to use Multiple Portal Aliasses (as Richard Mentioned).
URL rewriter is mostly used for http > https redirects. Example:
< rewrite> < rules> < rule name="HTTP to HTTPS redirect" stopProcessing="true"> < match url="(.*)" /> < conditions> < add input="{HTTPS}" pattern="off" ignoreCase="true" /> < /conditions> < action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" /> < /rule> < /rules> < /rewrite>
These Forums are for the discussion of the open source CMS DNN platform and ecosystem.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.