relative-path

Why might the wrong subdomain be used for a resource relative path?

I have one web page with an iframe. The iframe is on a different subdomain to the outerpage. The iframe page references style sheets (in the form of webresource.axd files) that have relative paths. The problem is, Internet Explorer (6, 7 and 8) appears to be turning these relative paths into complete URLs but with the wrong subdomain. I...

Correct way to reference content in MVC

When running my web app on my local machine i can ref css/scripts/images using: <link href="/Content/Site.css" rel="stylesheet" type="text/css" /> But when I deployed to my Development server, it wasn't able to find any of my content. After researching the issue everyone suggests using the below method: <link href="<%=Url.Content("~/...

I need to reference an image in my code, from two different pages (with different paths to /images)

So, I have a function: public string genSomeHtml(){ //Gen some html including and image called foobar.gif } Now, I want to call genSomeHtml() from two different pages, but they have different paths to /images. So, I can't exactly use "../../images/foobar.gif" and I'd rather not pass a param to tell me where to look. Afterall, the...

Determining a file's path name from different working directories in python

Hi all- I have a python module that is shared among several of my projects (the projects each have a different working directory). One of the functions in this shared module, executes a script using os.spawn. The problem is, I'm not sure what pathname to give to os.spawn since I don't know what the current working directory will be wh...

Switched to new server - Why do relative links link to ip address, not domain.name

Just started a new server - relative urls go to ip.numb.er/files rather than www.domain.com/files and this is causing images and links to work incorrectly. Did I misconfigure something? Forget to turn on a switch? ...

Using relative paths for Gnome launcher

We're developing an app that needs to run on a removable device (e.g. USB stick). On Linux, we're using Gnome launchers to place a shortcut to the app on the root of the device. However, we need to use relative paths for the executable and icon since we don't know in advance where the device will mount. In the .desktop file I have someth...

relative client url to http url

I have a property of a model class that contains a relative url to a file. ~/_docs/folder/folder/document.pdf How I can, in the view, transform it to an hyperlink to download the file itself? thanks ...

Wrong Behavior of Relative Paths in XCode Project When Adding New Files

First of all, I am far from an XCode guru and pretty much a newbie with it. The simplest thing have been bugging our team for quite sometime: Whenever I had a new file to the project and select "Relative to Project" or "Relative to Enclosing Group" I will always get a semi-relative path. I get something in the line of: ../../../../../T...

How to read xml file from a relative path in RIA Service?

Hi, I am trying to read an XML file in RIA Service and I am getting the following error. Load operation failed for query 'GetSummaryList'. Could not find a part of the path 'C:\WINDOWS\SYSTEM32\CoreResources\SumaryListDS.xml'. I am using Silverlight 4 which is using RIA service. I am trying to read the SumaryListDS.xml located in the ...

Regular expression to replace all ../../ with / URLs to be used in visual studio

I've recently inherited a site created in Dreamweaver where all URLs use the 'up one level' notation e.g. "../products/" and I would like to do a global find and replace with root path e.g. "/products/". What's the regular expression I need to use in the Visual Studio Find & Replace Dialog to replace the following matches: "../../../pr...

How to specify relative URLs in AXIS2 webservices?

So I have an Axis2 webservice deployed to apache tomcat 6.0.29. Its a getDocument service which uses MTOM to transfer files to the client from the server through the service. So what I want to do is when a client requests a specific file by its attributes[names, tags, author, etc.] I will pick up a file from my filesystem and tranfer as ...