No edit summary |
Hans Karlsen (talk | contribs) No edit summary |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
If you want to provide an easy to type URL for a specific use case hosting your site on Azure or on a local IIS, this is a | If you want to provide an easy-to-type URL for a specific use case hosting your site on Azure or on a local IIS, this is a useful example. | ||
In this example if the user goes to | In this example, if the user goes to | ||
<nowiki>https://app.world.se/su</nowiki> | <nowiki>https://app.world.se/su</nowiki> | ||
This will be redirected to | This will be redirected to: | ||
<nowiki>https://app.world.se/Turnkey/DisplayWithVariables?view=PublicSeeker&amp;id=22!1212&amp;vSeekNow=true</nowiki> | <nowiki>https://app.world.se/Turnkey/DisplayWithVariables?view=PublicSeeker&amp;id=22!1212&amp;vSeekNow=true</nowiki> | ||
and add additional parameters | and add additional parameters. In this case, a search string. | ||
This URL would open the search page and automatically set the search string to "bio". | This URL would open the search page and automatically set the search string to "bio". | ||
<nowiki>https://app.world.se/su?vSeekParam=bio</nowiki> | <nowiki>https://app.world.se/su?vSeekParam=bio</nowiki> | ||
But the end user will never see "DisplayWithVariables..." | But the end user will never see "DisplayWithVariables..." because [[DisplayWithVariables]] is a way to insert parameters in a ViewModel and open the view normally. | ||
==== Adding to | ==== Adding to Your Site ==== | ||
Open the '''Web.config''' in the '''wwwroot''' folder of your site and insert the rewrite code below the applicationInitialization | Open the '''Web.config''' in the '''wwwroot''' folder of your site and insert the rewrite code below the applicationInitialization - see below: | ||
(to have the same effect with a startup page showing while loading in Turnkey for .netCore see this article [[StartupViewTemplate]]) | |||
''<applicationInitialization doAppInitAfterRestart="true" skipManagedModules="true" remapManagedRequestsTo="Startup.htm">'' | ''<applicationInitialization doAppInitAfterRestart="true" skipManagedModules="true" remapManagedRequestsTo="Startup.htm">'' | ||
<add initializationPage="Turnkey/Index" /> | <add initializationPage="Turnkey/Index" /> | ||
Line 30: | Line 32: | ||
''</system.webServer>'' | ''</system.webServer>'' | ||
''And before the end of the system webserver section.'' | ''And before the end of the system webserver section.'' | ||
[[Category:Navigation]] | |||
[[Category:WebUI]] | [[Category:Navigation]] | ||
[[Category:WebUI]] | |||
{{Edited|July|12|2024}} |
Latest revision as of 10:59, 3 April 2024
If you want to provide an easy-to-type URL for a specific use case hosting your site on Azure or on a local IIS, this is a useful example.
In this example, if the user goes to
https://app.world.se/su
This will be redirected to:
https://app.world.se/Turnkey/DisplayWithVariables?view=PublicSeeker&id=22!1212&vSeekNow=true
and add additional parameters. In this case, a search string.
This URL would open the search page and automatically set the search string to "bio".
https://app.world.se/su?vSeekParam=bio
But the end user will never see "DisplayWithVariables..." because DisplayWithVariables is a way to insert parameters in a ViewModel and open the view normally.
Adding to Your Site
Open the Web.config in the wwwroot folder of your site and insert the rewrite code below the applicationInitialization - see below:
(to have the same effect with a startup page showing while loading in Turnkey for .netCore see this article StartupViewTemplate)
<applicationInitialization doAppInitAfterRestart="true" skipManagedModules="true" remapManagedRequestsTo="Startup.htm"> <add initializationPage="Turnkey/Index" /> </applicationInitialization> Insert the code below the applicationInitialization section above. <rewrite> <rules> <rule name="Redirect subdir" stopProcessing="true"> <match url="su" /> <action type="Redirect" url="https://app.world.se/Turnkey/DisplayWithVariables?view=PublicSeeker&id=22!1212&vSeekNow=true" appendQueryString="true" redirectType="Found" /> </rule> </rules> </rewrite> </system.webServer> And before the end of the system webserver section.