Ugly URLs when an ASP .NET MVC app is hosted in a virtual director

V

vbocan

I am using Godaddy Deluxe hosting which allows me to host several websites in
a single hosting account. The main website is hosted in the root of the
hosting account and the rest of the websites are hosted in a subfolder in the
form /hosting/websitename.

If I deploy an MVC app under a virtual directory, I get ugly looking URLs
like:

http://www.mywebsite.com/hosting/mywebsite/Home/About

Note the /hosting/mywebsite part. For some reason the Html.ActionLink helper
method infers the real hosting path which is exactly what I want to avoid.
The URL should look like:

http://www.mywebsite.com/Home/About

The problem is easily reproducible by creating a new MVC application and
changing the folder of the dev server from root (/) to something else (such
as /hosting/).

How can I go about that apart from purchasing a new Godaddy hosting account?
 
G

Gregory A. Beamer

I am using Godaddy Deluxe hosting which allows me to host several
websites in a single hosting account. The main website is hosted in
the root of the hosting account and the rest of the websites are
hosted in a subfolder in the form /hosting/websitename.

The problem here is you do not have a URL pointed directly to the sub-
site. Until you do that, you will have the ugly URL.

One possible way around it is an HTTP Handler, but I have a feeling
GoDaddy will not allow you to install one for your site. Just my two
cents.

If you want to get the Short URLs, you can set up routing rules in the
main site (not your sub-site), but realize that directories with the
same name will end up being problematic, so this is a kludge, at best.

Peace and Grace,
Greg

--
Vote for Miranda's Christmas Story
http://tinyurl.com/mirandabelieve

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top