471,354 Members | 1,187 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

virtual path from a physical one

Hi,

I was wondering is there a way to get the virtual path (i.e.
http://localhost/blah/blah) if you specify a physical one (i.e.
C:\wwwroot\inetput\exampleDir).

I know you can do the opposite with Server.MapPath. However I'm
looking for going from physical to virtual path.

Thanks

:D

Dec 3 '05 #1
2 6105
I think you may be looking for Request.PhysicalApplicationPath. Scott Cate
put up a nice summary table of all this here:

http://weblogs.asp.net/scottcate/arc...15/257736.aspx

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"dm**********@yahoo.com" wrote:
Hi,

I was wondering is there a way to get the virtual path (i.e.
http://localhost/blah/blah) if you specify a physical one (i.e.
C:\wwwroot\inetput\exampleDir).

I know you can do the opposite with Server.MapPath. However I'm
looking for going from physical to virtual path.

Thanks

:D

Dec 3 '05 #2
Actually no,

What I want is when I pass in to a function (i..e
C:\wwwroot\inetpub\test\test\test), it will convert it to a virtual
root like http://localhost/test/test/test.

Is there something that does that?

Thanks

:D

Dec 4 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by And | last post: by
4 posts views Thread by david | last post: by
6 posts views Thread by Saar Carmi | last post: by
16 posts views Thread by B Letts | last post: by
14 posts views Thread by Lorenzo | last post: by
2 posts views Thread by Lucky | last post: by
4 posts views Thread by =?Utf-8?B?SmVmZiBCZWVt?= | last post: by
5 posts views Thread by Ned White | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.