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 6859679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:18:50+00:00 2026-05-27T02:18:50+00:00

I typically refer to any assets on my site using absolute path so that

  • 0

I typically refer to any assets on my site using absolute path so that I don’t have to worry about the location of the assets relative to current file.

<!-- Using a absolute path. -->
<img src="/images/flag.png" />
<!-- Using a relative path. -->
<img src="../../../images/flag.png" />

However, this time I need to host the site at a non-root location e.g. http://my-server.com/holiday/.

How would I go about this? I am looking for a solution that doesn’t require me to change the path in my files. How do I configure the server (Apache) to treat http://my-server.com/holiday/ as a “root”?

Clarification:
I still need http://my-server.com/ to behave “normally”. That is, it should still point to http://my-server.com/index.html i.e. doesn’t get redirected to http://my-server.com/holiday/.

  • 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-27T02:18:50+00:00Added an answer on May 27, 2026 at 2:18 am

    I hate to say this but none of the above provides the solution. The answers by @Zoltan and @stslavik were close but, unfortunately, didn’t work when deployed; I wished one of them worked, though.

    As a result, I resorted to using a combination of named constants and include files in PHP. More details: File Structure for a PHP Project. Note that it doesn’t have to be PHP; you can use other languages that provide similar features. +1 for @margusholland whose answer led me to experiment with this solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using jQuery to build an ajax-heavy site. I typically use jQuery selectors
Typically I create a plugin when I have a module that I know I'm
I have a question about formatting the Rupee currency (Indian Rupee - INR). Typically
Typically when you run any program, during execution time what are different storages available
I have a C# Windows service that listens to a HTTP port and fires
It occurred to me today that although I've adopted and don't infrequently use the
Typically, I am used to a: local, local-test, dev(dev.site.com), and prod(site.com). With rails local
Typically I implement classes (C#, C++) via many private functions that serve no purpose
I have a graph which I traverse using a typical visitor pattern. I've run
typically when you refer to an object you would use a selector like this

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.