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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:35:31+00:00 2026-05-14T07:35:31+00:00

There is a ASP.NET MVC 2 web app, lets call it myapp.com. I want

  • 0

There is a ASP.NET MVC 2 web app, lets call it myapp.com. I want dynamic subdomains (user created categories) like something.myapp.com. So i have set up URL rewrite with rule rewriting something.myapp.com -> myapp.com/something (which is handled by MVC next..). But, the first ActionLink throws an exception

System.Web.HttpException: Cannot use a leading .. to exit above the top directory

because, obviously, the URL is still something.myapp.com for it. Is there any elegant solution for this ? I dont want to redirect (I want to keep URL something.myapp.com in browser). Also I dont like the idea of writing custom ActionLink, some of the most basic stuff in MVC…

thanx guys 🙂

Roman

  • 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-14T07:35:31+00:00Added an answer on May 14, 2026 at 7:35 am

    The first thing you have to understand is the difference between Routing and Rewriting. This can best be described by this blog:

    http://www.coderjournal.com/2010/03/difference-between-routing-rewriting/

    As a follow up to the article a project for editing Routing inline with Rewriting was also created, to help demonstrate the differences and more importantly how they can be used together.

    http://www.coderjournal.com/2010/03/editable-mvc-routes-apache-style/

    But to answer your question more directly, you need to make sure the URL Rewriter is getting processed before the Routing, so that everything is modified and normalized for you ahead of time.

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

Sidebar

Related Questions

I have an ASP.NET MVC web app whose controllers use WCF to call into
Is there a way that I can run a ASP.NET MVC Project on godaddy.com
What is the best method for user authorisation/authentication in ASP.NET MVC? I see there
I have an ASP.NET MVC web app which has a really basic subscription system
I am writing a simple ASP.NET MVC web app. At this point, I am
Using ASP.NET MVC there are situations (such as form submission) that may require a
In ASP.NET MVC is there an equivalent of the Html.ActionLink helper for Img tags?
Since there is no concept of sessions in ASP.Net MVC and each request is
Some texts on ASP.NET MVC state that there are no runat server tags, even
I'm new to asp.net mvc world. Are there any cms system based on asp.net

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.