Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved How to create an App (Tile) on the My Apps Dashboard with a redirect?

    Support
    redirect
    6
    7
    447
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • imc67
      imc67 translator last edited by girish

      I got a user request to add a "Tile"/app to the My Apps Dashboard that only leads to an external URL (our NAS in this case).

      How can I do that easily?

      (I tried Surfer but php neither htaccess redirections worked)

      fbartels 1 Reply Last reply Reply Quote 0
      • girish
        girish Staff last edited by

        What @fbartels said. Put this in index.html or surfer (replace url):

        <!DOCTYPE html>
        <html>
           <head>
              <title>HTML Meta Tag</title>
              <meta http-equiv = "refresh" content = "2; url = https://www.cloudron.io" />
           </head>
           <body>
              <p>Will redirect shortly to https://www.cloudron.io/.</p>
           </body>
        </html>
        
        jdaviescoates imc67 2 Replies Last reply Reply Quote 2
        • fbartels
          fbartels App Dev @imc67 last edited by

          @imc67 surfer is a node app, it does not support php or understand .htaccess. the one thing that should work however is simple html:

          https://en.m.wikipedia.org/wiki/Meta_refresh

          1 Reply Last reply Reply Quote 0
          • girish
            girish Staff last edited by

            What @fbartels said. Put this in index.html or surfer (replace url):

            <!DOCTYPE html>
            <html>
               <head>
                  <title>HTML Meta Tag</title>
                  <meta http-equiv = "refresh" content = "2; url = https://www.cloudron.io" />
               </head>
               <body>
                  <p>Will redirect shortly to https://www.cloudron.io/.</p>
               </body>
            </html>
            
            jdaviescoates imc67 2 Replies Last reply Reply Quote 2
            • jdaviescoates
              jdaviescoates @girish last edited by

              @girish I just tried doing that just to try it out, worked perfectly

              https://testing.uniteddiversity.org/

              I use Cloudron with Gandi & Hetzner

              1 Reply Last reply Reply Quote 1
              • imc67
                imc67 translator @girish last edited by

                @girish this works!!! Thanks for the hint.

                1 Reply Last reply Reply Quote 0
                • Referenced by  marcusquinn marcusquinn 
                • subven
                  subven last edited by

                  I did it using the LAMP app. Just edit the .htaccess within /app/data/public/

                  RewriteEngine On 
                  RewriteCond %{HTTP_HOST} ^lampapp.domain.com [NC]
                  RewriteRule (.*) https://target.domain.com/$1 [R=302,L]
                  
                  1 Reply Last reply Reply Quote 1
                  • nebulon
                    nebulon Staff last edited by

                    To follow up here, the next release 7.3 has built-in support for external links in the dashboard, so it will be unnecessary to install some trampoline app like surfer or lamp.

                    1 Reply Last reply Reply Quote 2
                    • First post
                      Last post
                    Powered by NodeBB