Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there a way to quickly/easily create symbolic link to existing website folder?
    primarykey
    data
    text
    <h1>Description:</h1> <p>I often run into this problem when I have a website located in <code>/var/www/</code> that grows way too large, and decide to move, essentially all of it, to <code>/var/www/main_files</code>. Simply putting a symbolic link <code>/var/www/index.html</code> pointing to <code>/var/www/main_files/index.html</code> does not work. I believe the reason it does not work is because the <code>index.html</code> file is still be "executed" in the directory of the symbolic link (<code>/var/www</code>). Therefore, any files which need to be included/fetched, will no longer have the correct paths.</p> <p>One could change the VHost directory to <code>/var/www/main_files</code>, but that is too permanent. I may still want to have a few files in <code>/var/www</code>. 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.</p> <h1>Question:</h1> <p>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 <strong>www.example.com/index.html</strong>, load the web page as if the user had gone to <strong>www.example.com/main_files/index.html</strong>? If not, then what other options should I consider?</p> <h1>Motivation:</h1> <p>I most often run into this problem when I want to debug a site, and I quickly download a free template (ie <a href="http://www.quackit.com/goto/?t=/html/templates/download/bryantsmith/anoceanofsky.zip" rel="nofollow">download this one</a>). Most of these templates have all their files in the top folder, making it very messy to dump it all to <code>/var/www</code>, 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 <strong>www.example.com/index.html</strong>, not explicitly from <strong>www.example.com/template1/index.html</strong></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload