#<Directory "D:/Server/Apache2/manual"> <Directory "G:/"> Options Indexes AllowOverride None Order allow,deny Allow from all <Files *.html> SetHandler type-map </Files> SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1 RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2 </Directory>
我在httpd.conf中找到以下描述:<Directory "D:/usr/www/html">#<Directory "E:/mobile"># # This may also be "None", "All", or any combination of "Indexes", # "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews". # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # Options Indexes FollowSymLinks MultiViews
# # This controls which options the .htaccess files in directories can # override. Can also be "All", or any combination of "Options", "FileInfo", # "AuthConfig", and "Limit" # AllowOverride None# # Controls who can get stuff from this server. # Order allow,deny Allow from all
<Directory "G:/">
Options Indexes
AllowOverride None
Order allow,deny
Allow from all <Files *.html>
SetHandler type-map
</Files> SetEnvIf Request_URI ^/manual/(de|en|es|fr|ja|ko|ru)/ prefer-language=$1
RedirectMatch 301 ^/manual(?:/(de|en|es|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
</Directory>
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options Indexes FollowSymLinks MultiViews
#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>--------------------------------------------
我把其中的Options Indexes FollowSymLinks MultiViews给#了,重启apache,但是仍然会列出目录,何解?
--------------------------------Options FollowSymLinks MultiViews
中文httpd.conf文件,也许对你有帮助