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 6818599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:11:55+00:00 2026-05-26T21:11:55+00:00

I am working on site which is scattered in multiple subdomains. From the main

  • 0

I am working on site which is scattered in multiple subdomains. From the main site I have to create url which points to sudomains. How can I do this.

for example, my main site is http://www.mysite.com
I need to create a url pointing to blog.mysite.com/userId/Name which will point to HomeController and Index method witch userId and name.

Also, how should I handle the urls on local machine as well on the production machine.

Help will be appreciated

updating my question here.

What does

@Html.ActionLink("MyLink","Index","Profile","","www.test.com",null,null,null)

do.

It creates a link, but with port number in it. If there is anyway I can avoid it.

Regards

Parminder

  • 1 1 Answer
  • 2 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-26T21:11:56+00:00Added an answer on May 26, 2026 at 9:11 pm

    As your sub domains will host their own applications with controller and actions I’d recommend to use the good old HTML hyperlink to create that link:

    <a href="blog.mysite.com/userId/Name">Your Blog</a>
    

    Why: Because you do not want to couple your disjoint applications and ASP.NET MVC does not have a clue (and should not have a clue) about the routes used in some other application. For constructing the link you can add an extension method to HtmlHelper to avoid typos and URL path encoding quirks.

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

Sidebar

Related Questions

I have this classic ASP site which has been working fine until we updated
I'm currently developing a Django site in which users can have multiple 'accounts', so
I'm working on a site in which users can opt-in for email notifications for
I am working on a URL shortening site which uses PHP, MySQL and Apache.
i am working on a recipe site (which is almost finished except this problem)
I have a site which is in online, two days back i create a
I'm working on an ASP.NET MVC site which will have a database. While I'm
I am working on a site which displays products from a database in a
I have a site which uses overlay pages, all was working fine until I
I am working on a site which people already know the URL of. Naturally,

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.