Hoppa till huvudinnehållet

Redirecting an internal URL to a site

Kommentarer

3 kommentarer

  • John Nerge
    We use Default.htm files on our web server to redirect people to our viewers. I'm not a web expert, so there are probably better or more standard ways to do it, but this has worked well for us.

     

    For a simple redirect, you can just create a folder in your wwwroot and store the Default.htm there. So in your case, you would set up a folder like C:\inetpub\wwwroot\yourSite so that when people go to http://ourmaps/yourSite they get redirected.

     

    The Default.htm file in that directory would have this content:

     

    <html>

     

      <head>

     

        <title>Your Page Title</title>

     

      </head>

     

      <body>  

     

        <script type="text/javascript">

     

     {

     

            window.location = "http://servername/Geocortex/Viewers/Html5Viewer_2_3_3/Indexintro.html?configBase=http://vmgisapp04/Geocortex/Essentials/421/REST/sites/HS_Test/viewers/HS_Test/virtualdirectory/Resources/Config/Default";}

     

        </script>

     

        </body>

     

    </html>
    0
  • Halil Siddique
    Thanks for that John.... coincidently today i found that I could also use a frameset tag

     

    <frameset rows="100%">

     

      <frameset cols="100%">

     

        <frame src="{SITE_URL}" frameborder="0" scrolling="no">

     

      </frameset>

     

    </frameset>

     

    Which also doesnt add the long url to the address bar, but it keeps the short one.

     

     
    0
  • John Nerge
    Some thoughts on frames vs. iframes:

     

    http://programmers.stackexchange.com/questions/144515/why-were-frames-deprecated-in-html5-but-not-iframes

     

    In short, iframes are better because they're accessibile and part of HTML5.
    0

Du måste logga in om du vill lämna en kommentar.