Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Get Application Server to Automatically direct to a folder on Server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Get Application Server to Automatically direct to a folder on Server

    This may be an unusual situation and I'll try to explain it: Currently when I want to direct a client to a specific application, I simply add the folder to the URL to tell it which folder has the specific application. Here's an example: To go to "Application A", the URL would be "http://webdata.com/Appa" and to go to "Application A", the URL would be "http://webdata.com/Appa" and go to "Application B", the URL would be "http://webdata.com/Appb", etc. The application server directs the user to the correct folder ("Appa" or "Appb"). I works very well for me.

    However, for a project I'm working on, I don't want the user to have to add the "folder" to the URL. I need them to enter either, "http://www.philsusers.com" or "http://www.philsguests.com" and have the Application Server direct them to the correct folder based on which URL they enter. Both of those URL's resolve to the same server.

    Is that possible? I'm pretty sure I read that you can set the Application Server to detect which URL was entered and direct that URL to the correct folder on the server. I'd appreciate any suggestions you can offer.

    Thanks!
    Phil

    #2
    Re: Get Application Server to Automatically direct to a folder on Server

    This is what I have in the header on www.iadn.com. The first IF-ENDIF forwards user to a different URL if they enter the old URL. The second redirect is for SEO purposes.

    <%a5
    uri = request.request_uri
    if containsi(request.host,"alphadevnet")
    response.redirect("http://iadn.com"+uri)
    end if
    if containsi(request.host,"www")
    response.redirect("http://iadn.com"+uri)
    end if

    %>
    Steve Wood
    See my profile on IADN

    Comment


      #3
      Originally posted by Steve Wood View Post
      This is what I have in the header on www.iadn.com. The first IF-ENDIF forwards user to a different URL if they enter the old URL. The second redirect is for SEO purposes.

      <%a5
      uri = request.request_uri
      if containsi(request.host,"alphadevnet")
      response.redirect("http://iadn.com"+uri)
      end if
      if containsi(request.host,"www")
      response.redirect("http://iadn.com"+uri)
      end if

      %>
      Hi Steve-

      It was so kind of you to respond (especially on the weekend). I think the code you sent is exactly what I was looking for. However, I have two questions:
      1) I went to www.iadn.com two ways: http://www.iadn.com and http://alphadevnet.com. In both cases, I ended up at the same place. Is that because you were just giving me an "example" to follow or should I have ended up at another page?
      2) Where would this code go. Is there someplace on the Application Server settings that allows for an Alpha tag like the one you sent.

      I really appreciate your helping me with this. If I can get this to work, it will help me overcome one of my customer's objections.

      Thank you so much,
      Phil
      Last edited by Lenny Forziati; 03-03-2014, 10:50 AM.

      Comment


        #4
        Re: Get Application Server to Automatically direct to a folder on Server

        You can control this via the DNS A records. For example, you can have www.appa go one folder and www.appb go to another folder by simply inserting a DNS A record for each, and within that you specify the exact url for each.
        Gary S. Traub, Ph.D.

        Comment


          #5
          Re: Get Application Server to Automatically direct to a folder on Server

          1) I went to www.iadn.com two ways: http://www.iadn.com and http://alphadevnet.com. In both cases, I ended up at the same place. Is that because you were just giving me an "example" to follow or should I have ended up at another page?
          You end up in the same place because the redirect code (my previous post) is working properly. It is an example of redirecting someone who comes to alphadevnet.com (the old address) routing them to the new address iadn.com. It doesn't mean much to the user but it helps move my SEO from old AlphaDevNet domain to IADN domain and because eventually I will want to kill the AlphDevNet.com address. So code I did not show, show who is still hitting the old domain so I know when I can safely cut it off.

          Here is an other example that uses redirect: www.trinav.com and athearnmarine.com are exactly the same Alpha Five application but use code similar to my previous post to change the look-and-feel for each to be unique.

          But neither of those examples are exactly what you are looking for. You want something like this that redirects to a particular URL with a subfolder depending on the domain they use to hit the site. I am showing the code below, but I have a feeling it will need to be tweaked to not affect users who ARE on the correct URL, the one that includes the subfolder already:

          uri = request.request_uri
          if containsi(request.host,"appa")
          response.redirect("http://myapp.com/myfolderA"+uri)
          elseif containsi(request.host,"appb")
          response.redirect("http://myapp.com/myfolderB"+uri)
          end if

          BUT the truth is, you really should investigate Gary suggestion which expands to this: a) run each Alpha Five application on a different instance, b) set up DNS for each of your domains to point to unique IP address, c) point each IP to one of the Alpha Five instances, and d) point each instance to a different folder, called the "Document Root". Obviously that will take more work on your part to understand and set up. You can review http://help.iadn.com/bestpractices document under Multiple Instances for more information.

          Part of the reason you should look at this is technically you should not put applications in subfolders without also running them on separate Alpha Five instances. But if you are not experiencing any problem, then it is probably OK.

          2) Where would this code go. Is there someplace on the Application Server settings that allows for an Alpha tag like the one you sent.
          It would go on whatever A5W page that you are sure the user will hit when they come to the website. I use a "header" so that ALL of my A5W pages will have this code.
          Steve Wood
          See my profile on IADN

          Comment


            #6
            Re: Get Application Server to Automatically direct to a folder on Server

            Originally posted by Steve Wood View Post
            You end up in the same place because the redirect code (my previous post) is working properly. It is an example of redirecting someone who comes to alphadevnet.com (the old address) routing them to the new address iadn.com. It doesn't mean much to the user but it helps move my SEO from old AlphaDevNet domain to IADN domain and because eventually I will want to kill the AlphDevNet.com address. So code I did not show, show who is still hitting the old domain so I know when I can safely cut it off.
            Steve, for SEO purposes and the ability to phase out the older domain name, you should take a look at Response.RedirectPermanent(). Various search engines may handle it differently, but this is the generally preferred way to tell them to only use the new name.

            Lenny Forziati
            Vice President, Internet Products and Technical Services
            Alpha Software Corporation

            Comment


              #7
              Re: Get Application Server to Automatically direct to a folder on Server

              Gary-

              Your suggestion is excellent. I edited the DNS A record and got EXACTLY what I was looking for. I'm going to set up a couple of instances to see how I can really leverage that for multiple applications on my server.

              The Alpha group is so great to share ideas. I really appreciate your time.

              Thank you.

              Phil

              Comment


                #8
                Re: Get Application Server to Automatically direct to a folder on Server

                Thanks Steve-

                That clears it up. I did try Gary's suggestion and that got me to where I was going. I will also be able to use the "redirect" script in my applications. That was very helpful. I'll just put the code in my index.a5w page.

                Thanks so much for your help.

                Phil

                Comment


                  #9
                  Re: Get Application Server to Automatically direct to a folder on Server

                  Just for clarification, don't A records point to IP addrresses, not specific folders?
                  Richard Urban

                  Grocery Delivery Software for Stores and Entrepreneurs: http://www.urbangrocery.com

                  Comment


                    #10
                    Re: Get Application Server to Automatically direct to a folder on Server

                    If you are running Internet Information Services 7 or above on your server you can set up an IIS website for that domain or sub domain and then use the http redirect feature to direct that domain or sub domain to a particular folder.
                    Richard Urban

                    Grocery Delivery Software for Stores and Entrepreneurs: http://www.urbangrocery.com

                    Comment


                      #11
                      Re: Get Application Server to Automatically direct to a folder on Server

                      Hi Richard-

                      Yes DNS A records do point to IP Addresses, but they can also point to full url's. So you can have a DNS A record point to:
                      - 70.45.191.31; or
                      - 70.45.191.31/Philsdata; or
                      - webdata.com; or
                      - webdata.com/Philsdata

                      I hope that helps.

                      Phil

                      Comment


                        #12
                        Re: Get Application Server to Automatically direct to a folder on Server

                        I think there are two reasons to use IIS http redirect:
                        1) You will save needing to purchase extra IP addresses.
                        2) If you have a security certificate on your alpha five server on a sub-domain, when you use a DNS A record to change the destination to the root domain or another sub domain, it will no longer be valid. For instance, cart2.urbangrocery.com uses a security certificate. When I use a DNS A record to direct traffic to www.urbangrocery.com hosted by the alpha five WAS, then the security certificate is no longer valid. However, by using an IIS http redirect, I can redirect traffic for www.urbangrocery.com to cart2.urbangrocery.com. That way, the security certificate is still valid.
                        Richard Urban

                        Grocery Delivery Software for Stores and Entrepreneurs: http://www.urbangrocery.com

                        Comment


                          #13
                          Re: Get Application Server to Automatically direct to a folder on Server

                          I have tried two different DNS providers that I use, and neither allows putting anything other than the IP address in the A record, not a subfolder. Does anyone have more information about how this is done, or if you think it is specific to certain DNS providers, or if it is an extra service?
                          Richard Urban

                          Grocery Delivery Software for Stores and Entrepreneurs: http://www.urbangrocery.com

                          Comment


                            #14
                            Re: Get Application Server to Automatically direct to a folder on Server

                            Hi Richard-

                            Sorry for taking so long to get back to you... I was away from my e-mail.

                            So that you can actually try it, the URL I wanted to "redirect" is "www.surveyrecipes.com". If you enter that address, you'll go to my application. However, I am hosting several applications on that server AND that location doesn't even have a static IP address. That's what I needed to accomplish. How can I get the various URL's to go to the correct application server address at my location.

                            Anyway, here's what I did:
                            1) I already had a DDNS redirect for my server (because I have a dynamic IP at my office). It's "yigcomputers.no-ip.org". You can get a free account at www.no-ip.com, if you need it (I have a paid account)
                            1) Registered the desired URL (www.surveyrecipes.com) with a Registrar (for this one, I picked GoDaddy, because they were having a sale);
                            2) I signed up for a "Managed DNS" Account with www.no-ip.com (I had a discount, but I think it was only ~$25/year)
                            3) Logged onto my GoDaddy Account and entered "no-ip.com's" Name Servers (see Image 1 on attached file)
                            4) Logged onto my no-ip.com account and entered the DNS Information to redirect "surveyrecipes.com" to my office ("yigcomputers.no-ip.org"). You'll notice that I added the specific "folder" to the redirect so that it goes to the correct application (see image 2 on attached file).

                            I don't know if that's exactly what you were looking for, but it works for me. This way, I can give my customers a very personal URL (domain) and still have it go to my application server that hosts my Alpha applications.

                            Hope that helps.

                            Phil
                            Attached Files

                            Comment


                              #15
                              Re: Get Application Server to Automatically direct to a folder on Server

                              Could you use the IIS URL Rewrite reverse proxy feature to direct traffic from a domain to an Alpha Five application server sub-folder, so example.com would be directed to a5application/example? Also, could an outbound rule be written?
                              Richard Urban

                              Grocery Delivery Software for Stores and Entrepreneurs: http://www.urbangrocery.com

                              Comment

                              Working...
                              X