Điều đầu tiên bạn sẽ muốn làm là thêm một thư mục bí danh để XAMPP bạn cài đặt:
C:\xampp\apache\conf\alias
Tiếp theo, bạn sẽ cần phải thay đổi tệp cấu hình Apache của bạn. Bạn có thể tìm thấy nó dưới
C:\xampp\apache\conf\httpd.conf
Khi bạn đã mở httpd.conf, thêm dòng sau vào cuối cùng và lưu nó.
Include "conf/alias/*"
Bây giờ, đối với mỗi bí danh bạn muốn tạo bạn cần để tạo ra một tập tin như thế này:
<directory "c:\users\foo\programming\dev">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
# Order allow,deny
Allow from all
</Directory>
Alias /dev "C:\users\foo\programming\dev"
Trong ví dụ này bí danh được gọi là "dev" và nó trỏ đến " C: \ users \ foo \ programming \ dev "
Cuối cùng, bạn cần khởi động lại Máy chủ Apache của bạn và đúng vậy.
Nguồn
2014-10-13 14:02:24
liên kết này đã chết Tôi sợ – pluke
Tôi đã cập nhật nó thành tất cả văn bản, trông giống như dưới đây. Tôi cũng tìm thấy vị trí của tập tin cấu hình trên các diễn đàn Xampp và thêm một liên kết đến đó để tham khảo. – Melikoth
Điều này đã cho tôi một thời gian dài, nhưng có một dòng thiếu. Các giải pháp thích hợp nên bao gồm 'Yêu cầu tất cả các cấp' để làm việc. – Veehmot