Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4609022
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:55:40+00:00 2026-05-22T00:55:40+00:00

I have downloaded a complete website that will be upgrading for a client. I

  • 0

I have downloaded a complete website that will be upgrading for a client.
I have noticed the code is unable to locate files (css,js,images etc.).
The paths are coded like this — with a forward slash in the beginning /.
Removing those / from the beginning of each href, src or whatever
solves the issue on the local machine but of course messes things up online.

this will not work locally:

href="/design/layout.css"

this will (first slash removed)

href="design/layout.css"

What is the reason for this difference?
is there a system variable of some sort the a need to configure in order to get both servers to treat paths the same way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T00:55:41+00:00Added an answer on May 22, 2026 at 12:55 am

    If there is a / at the beginning of an relative URL then it is resolved as absolute path to the web root of a domain.

    Example absolute path (with / at the beginning):

    in a file on domain.com/test/other/path/test.html
    href="/design/layout.css" -> browser searches at domain.com/design/layout.css

    in a file on domain/test.html
    href="/design/layout.css" -> browser searches at domain.com/design/layout.css

    Conclusion absolute paths
    Browser searches at the same place both times.

    Example relative path (without / at the beginning):

    in a file on domain.com/test/other/path/test.html
    href="design/layout.css" -> browser searches at domain.com/test/other/path/design/layout.css

    in a file on domain/test.html
    href="design/layout.css" -> browser searches at domain.com/design/layout.css

    Conclusion relative path
    Browser searches at different places.


    Solution

    You can add a Apache Alias in your .htaccess or .conf file, this forces the server to output the content of the second path when requesting the the first path. In your case, Apache outputs the CSS files from the new path instead of /design/.

    Example of Apache Alias

    Alias /design /your/new/path/design
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have downloaded a font that looks less than desirable if it is not
I have a python application that relies on a file that is downloaded by
I have this method that receives an ID number and downloads an HTML website
I have a Drupal website where users are clicking on a link that initiates
I have downloaded an open source Qt that target on Windows. Since I am
I have completed client side code by download sample from git for push notification
have downloaded Orca to edit an MSI file. I want to remove some banner
I have downloaded the silver light from this http://www.microsoft.com/silverlight// I need to use this
I have downloaded Privoxy few weeks ago and for the fun I was curious
Does anybody use the Class Designer much in Visual Studio? I have downloaded the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.