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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:52:47+00:00 2026-06-01T16:52:47+00:00

Description: I often run into this problem when I have a website located in

  • 0

Description:

I often run into this problem when I have a website located in /var/www/ that grows way too large, and decide to move, essentially all of it, to /var/www/main_files. Simply putting a symbolic link /var/www/index.html pointing to /var/www/main_files/index.html does not work. I believe the reason it does not work is because the index.html file is still be “executed” in the directory of the symbolic link (/var/www). Therefore, any files which need to be included/fetched, will no longer have the correct paths.

One could change the VHost directory to /var/www/main_files, but that is too permanent. I may still want to have a few files in /var/www. I could also go through and manually change any file paths in the actual html/php/js files, but that is not only too permanent, it is painstakingly slow.

Question:

Is there a way, short of using mod_rewrite (which, again, is too permanent), to instruct Apache to follow symbolic links (assume symlinks are all within docroot) and, when the user goes to http://www.example.com/index.html, load the web page as if the user had gone to http://www.example.com/main_files/index.html? If not, then what other options should I consider?

Motivation:

I most often run into this problem when I want to debug a site, and I quickly download a free template (ie download this one). Most of these templates have all their files in the top folder, making it very messy to dump it all to /var/www, especially with more than one template. What I want is to make a subfolder for the template, but still be able to load it from http://www.example.com/index.html, not explicitly from http://www.example.com/template1/index.html

  • 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-06-01T16:52:48+00:00Added an answer on June 1, 2026 at 4:52 pm

    The instruction to follow symlinks is not part of the mod_rewrite, but is in the core of Apache

    To enable the feature you must add FollowSymLinks to the Options directive:

      <Directory /usr/local/httpd/htdocs>
        Options Indexes FollowSymLinks
      </Directory>
    

    See http://httpd.apache.org/docs/2.2/mod/core.html directive.

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

Sidebar

Related Questions

Description: I have a problem regarding DataGridView . I need to show a Client_Name
Probably this is often problem, but I can't solve it. I need to automaticallly
I have a basic class that I extend fairly often. I thought it would
I have and old AV that hunts me. It appears randomly (often but not
Problem description: Read an xml file, traverse to a particular node (element), if it
SHORT DESCRIPTION OF PROBLEM: I want to set the text of a searchbar without
Problem description : - Step 1: Take input FILE_NAME from user at main thread.
Here is a test description, testing the Create New Widget use-case. Confirm that you
html code meta tag description, it is generated dynamically and we have quotes in
Often, in C# documentation, you come across a member where the description says something

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.