-
Mar 7th, 2011, 03:38 AM
#1
Thread Starter
Fanatic Member
URL getting absolute path from relative path vb.net
Say URL1: http://domainname.com/hi/hello/world/ilikethis.htm
RelativePath: ../../hello.htm
Hence absolute path is http://domainname.com/hi/hello.htm
Is there a function that do that?
-
Mar 7th, 2011, 06:11 AM
#2
Fanatic Member
Re: URL getting absolute path from relative path vb.net
Are you talking about Server side... If yes... then there are functions for example in php, to get the absolute path of current script file by magic constant
__FILE__
$_SERVER['PHP_SELF'] gives the relative path of the file from the ROOT directory
$_SERVER['DOCUMENT_ROOT'] gives the server path.
Now... there must be functions in ASP, JSP and other scripts to perform these functions on server side.
-
Mar 7th, 2011, 06:54 AM
#3
Thread Starter
Fanatic Member
Re: URL getting absolute path from relative path vb.net
I am talking about client side. In vb.net
In general, if we look at a site http://domainname.com/soemthing/somewhere
and then there is a link there <a href="hithere.htm">
Clicking on the link will make us go to http://domainname.com/soemthing/somewhere/hithere.htm right?
How to turn http://domainname.com/soemthing/somewhere and hithere.htm into http://domainname.com/soemthing/somewhere/hithere.htm
Notice it also needs to be able to handle variants. Things like ../../hithere.html will produce http://domainname.com/hithere.htm
-
Mar 9th, 2011, 07:47 AM
#4
Thread Starter
Fanatic Member
Re: URL getting absolute path from relative path vb.net
Never mind. URI constructors do that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|