Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6583835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:27:39+00:00 2026-05-25T16:27:39+00:00

I have an application hosted on an Amazon server with two instances, one for

  • 0

I have an application hosted on an Amazon server with two instances, one for test and one for production.

ie.
On server 123.456.789.123 the app instances are
– wwwroot/myappuat
– wwwroot/myappprod

So the subdomain myapp.mydomain.com DNS settings point to the server 123.456.789.123
And rewrite rules have been set for these instances, let’s just look at production

<rule name="myapp.mydomain.com" stopProcessing="true">
<match url=".*" />
<conditions>
    <add input="{HTTP_HOST}" pattern="^myapp.mydomain.com$" />
</conditions>
<action type="Rewrite" url="\myappprod\{R:0}" />
</rule>

The trouble is when RedirectToAction seems to behave differently than when I was just testing on localhost in development.

For instance:

RedirectToAction("Login", "Home")

will redirect to http://myapp.mydomain.com/myappprod/Home/Login instead of the intended http://myapp.mydomain.com/Home/Login

I suspect I need to modify the routing settings in RegisterRoutes. But I don’t know what to do.

Any help on this will be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:27:39+00:00Added an answer on May 25, 2026 at 4:27 pm

    I found where I went wrong.

    Tilda’s.

    For example there is a redirect from the URL authorization to the login page which was set like this:

    <authentication mode="Forms">
      <forms loginUrl="~/Home/Login" timeout="2880" />
    </authentication>
    

    Since the URL has been rewritten, the path still included /myappprod.
    Removing the tilda fixed it

    <authentication mode="Forms">
      <forms loginUrl="/Home/Login" timeout="2880" />
    </authentication>
    

    One extra thing while I’m on here. Make sure you use Url.Content("~/url/here") not just "~/url/here". Particularly with those tildas.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two web application hosted on different server.For eg. one is main application
We have an ASP.NET web application hosted by a web farm of many instances
I have developed a web application that uses a web server and database hosted
I have a Asp.net/C# web Application hosted under IIS7.5 server 2008 64bit. my application
I have a .net 4.0 web application hosted on IIS7 server. After reading this:
I have a web application written in asp.net mvc2. Currently hosted on amazon cloud
i have a application who have hosted on currently on server testing. how i
I have a sharepoint application hosted on a windows 2003 server with the maximum
We have an application hosted on both a local development server and a live
I have an identical asp.net application hosted on two computers, PC1 and PC3 on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.