XAMPP Environment Access Absolute path under non-web DocumentRoot

Source: Internet
Author: User

Assuming that your XAMPP Web site document root is under c:/xampp/apache/htdocs/, then accessing the files in this directory is straightforward.

However, sometimes it is necessary to assign the user upload file to a special directory, such as e-drive, then users can access the directory under the non-web documentroot.

This can be implemented in Apache via the alias (alias) directive provided by the Mod_alias module, which establishes the mapping of the operating system's file absolute path and Web path.

Add the following code to your httpd.conf:

    1. Alias/desk "C:\Users\Administrator\Desktop\test"

    2. <Directory "C:\Users\Administrator\Desktop\test">

    3. Options Indexes followsymlinks MultiViews

    4. AllowOverride All

    5. Order Allow,deny

    6. Allow from all

    7. </Directory>

XAMPP Environment Access Absolute path under non-web DocumentRoot

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.