Questions tagged [relative-url]

A URL that is relative to another URL.

For example "image/logo.gif" is a relative URL, which full path can only be resolved by taking into account its parent URL. For example if a document is located at http://example.com/test, the full URL of that image would be http://example.com/test/image/logo.gif.

132 questions
6
votes
2 answers

Absolute URL from relative path

I've got a base URL and some relative URIs in that document I want to have the absolute path of. E.g. base = https://example.com/some/path.html?query=string and relative URIs in that document: index.html → https://example.com/some/index.html .. →…
Kijewski
  • 25,517
  • 12
  • 101
  • 143
6
votes
2 answers

Double slash at beginning of javascript include

I have been looking at the html5 boilerplate and noticed that the jquery include url starts with a double slash. The url is //ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js Why is the http: missing?
David
  • 61
  • 1
  • 2
6
votes
1 answer

relative link for directory above

I've got a file structure like so Root -index.html -adirectory ->fileinthedirectory.html I'd like to create a relative link from fileinthedirectory.html to index.html since /index.html links to /adirectory/index.html which doesn't exist.
Skizit
  • 43,506
  • 91
  • 209
  • 269
6
votes
2 answers

Cloudfront, EC2 and Relative URLs

This is probably a simple question, but I can't find a straightforward answer anywhere. My website is hosted on Amazon EC2. I want to take advantage of Amazon Cloudfront to speed up the loading of the images, Javascript and CSS on my…
Gio Hunt
  • 96
  • 4
5
votes
1 answer

How to work with submodules and n-tiers git repository strategies

We are migrating to git. We have a large number of modules that make up our products, some of them are shared between products. The product is represented by a "thin" super repository (ssh://server/product.git) that only contains…
simon
  • 707
  • 8
  • 22
5
votes
1 answer

how to get relative url from absolute url in django view?

Is there a handy function that converts absolute url to relative url in django? Preferably, it would return the absolute url if base url doesn't actually match.
eugene
  • 39,839
  • 68
  • 255
  • 489
4
votes
1 answer

Blazor retrieve relative url

I am looking to retrieve the relative part of the current Blazor page URL. For example if I am currently on https://www.mywebsite.com/someoverview, I wish to retrieve /someoverview.
JeroenR
  • 45
  • 7
4
votes
0 answers

CSS images with Relative URL sometimes relative to page URL in IE

I seem to be finding that IE sometimes tries to load CSS images with relative URLs, relative to the page url rather than the CSS file url. Example... someone loads this…
Charlino
  • 15,802
  • 3
  • 58
  • 74
4
votes
1 answer

Loading external HTML page with relative paths into a DIV using jQuery

I am relatively new to jQuery and pardon if this question is too simple, but I've searched numerous threads for hours and cannot find a definite solution. I have the following folder…
F L
  • 478
  • 1
  • 7
  • 18
4
votes
1 answer

urlparse.urljoin() not handling invalid parent directories

Is there a way to account for "invalid" parent directories when constructing an absolute URL from a relative one, or should I just use .replace()? >>> from urlparse import urljoin >>> url = urljoin('http://www.example.com/path/',…
Blender
  • 289,723
  • 53
  • 439
  • 496
3
votes
1 answer

How to handle relative font-face links in css when using minified css files generated by w3 total cache plugin for wordpress

I have to fix some issues at a wordpress site which another developer has set up with a custom theme. The theme includes a style.css file which is referencing a font file in the same theme: @font-face { font-family: 'foo'; src:…
lordrhodos
  • 2,689
  • 1
  • 24
  • 37
3
votes
3 answers

file_get_contents( - Fix relative urls

I am trying to display a website to a user, having downloaded it using php. This is the script I am using:
JBithell
  • 627
  • 2
  • 11
  • 27
3
votes
0 answers

Angular http get use absolute url instead of relative url

just trying this: var baseurl = "http://platform.fatsecret.com/rest/server.api"; var request = $http.get(baseurl); request.success(function(html) { $log.log(html); }); request.error(function(html) { $log.log(html); }); but angular keeps…
user2405469
  • 1,953
  • 2
  • 22
  • 43
3
votes
2 answers

How to go to sub-directory with relative URI

Sorry if it so basic but I could not find the answer by searching. If we are in the page http://www.example.com/a-dir-without-trailing-slash how we can reach the sub-directory http://www.example.com/a-dir-without-trailing-slash/pic using relative…
Ormoz
  • 2,975
  • 10
  • 35
  • 50
3
votes
0 answers

relative URL seems to be interpreted incorrectly by the browser

I have a relative URL on a page, which is being interpreted relative to the root (instead of relative to the current doc). Can't figure out why. On page: http://vm:8080/docs There is a tag: Show…
Ziffusion
  • 8,779
  • 4
  • 29
  • 57
1
2
3
8 9