Skip to content

Relative urls using pathjs #89

Open
@docmattman

Description

I'm having trouble with relative image urls and links when using pathjs and routing. I am developing in http://localhost/app and on that page, I have relative urls for images (i.e. src="images/some.jpg"). When I navigate to some route (i.e. "test/route/1"), the url changes to http://localhost/app/test/route/1, which is expected. But if I refresh that page on that route, the image no longer works. It is looking for the image at http://localhost/app/test/route/1/images/some.jpg (incorrect location) instead of http://localhost/app/images/some.jpg (correct location). Is there a way to use relative urls for links and image sources when routing with pagejs?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions