[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

Base in HTML

Hi

Can we specify a folder path instead of a URL?

Can the following work?


<html>
<head>
<base href="/images" />                //or this should be "http://www.mydomain.com" only
</head>

<body>
<img src="house.jpg" alt="This is my house"/>

</body>
</html>
0
JRawabi
Asked:
JRawabi
1 Solution
 
GaryCommented:
You can but IE doesn't like it - which makes it pointless doing it that way.
0
 
Amar BardoliwalaCommented:
Hello jrawabt,

it should work.

Please look at following link to learn about absolute and relative paths.

http://webdesign.about.com/od/beginningtutorials/a/aa040502a.htm

http://www.coffeecup.com/help/articles/absolute-vs-relative-pathslinks/

Hope this will help you.

Thank you.

Amar Bardoliwala
0
 
Julian HansenCommented:
To clarify your question

Are you asking if the base ref can include a folder path or only a domain i.e. the following is valid

http://mydomain.com/images

If you mean just

/images

Then not sure what the objective is - you are trying to set a fixed base url to a relative path - why not just specify base ref as

http://mydomain.com/images

I think you need to maybe give more information on what you are trying to achieve.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
JRawabiAuthor Commented:
julianH

Thanks for the reply.

Just local folder like /images

I am trying to fix a path not a url. Is that possible?

Thanks
0
 
JRawabiAuthor Commented:
amar_bardoliwala

See my comment above. I want to use the base tag and use a local path not a url.

<base href="/images" />  not a domain name.
0
 
GaryCommented:
As I said, it will not work in IE - you have to use the full url.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now