Virtual Directory asp.net mvc
2 posts
• Page 1 of 1
Virtual Directory asp.net mvc
Hello everyone,
I have been trying to solve this problem for a few days but not succeed at at all.
I have a application deployed in a shared hosting . This app is in a subdirectory in the room www\root\myapp.
when I access the app the name of the virtual directory is add to my URL . myapp.rodominas.com/myapp/home/index
any actionlink or even ajax calls are broken since I should have a url like this myapp.rodominas.com/home/index.
is there any way to remove the virtual directory name from the url in any requisition in the website?
I appreciate the help. best regards.
I have been trying to solve this problem for a few days but not succeed at at all.
I have a application deployed in a shared hosting . This app is in a subdirectory in the room www\root\myapp.
when I access the app the name of the virtual directory is add to my URL . myapp.rodominas.com/myapp/home/index
any actionlink or even ajax calls are broken since I should have a url like this myapp.rodominas.com/home/index.
is there any way to remove the virtual directory name from the url in any requisition in the website?
I appreciate the help. best regards.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Virtual Directory asp.net mvc
Hello,
Please try using the following:
Regards
Andrew
Please try using the following:
- Code: Select all
RewriteEngine on
RewriteBase /
# 301 redirect myapp/home/index --> /home/index.
RewriteRule ^myapp/home/index$ /home/index [NC,R=301,L]
/home/index -->myapp/home/index
RewriteRule ^home/index$ /myapp/home/index [NC,L]
Regards
Andrew
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests