虚拟主机配置伪静态如何配置

2025-04-13 04:47:17
推荐回答(1个)
回答1:

加载Rewrite模块:

在conf目录下httpd.conf中找到

LoadModule rewrite_module modules/mod_rewrite.so

这句,去掉前边的注释符号“#”,或添加这句。

允许在任何目录中使用“.htaccess”文件,将“AllowOverride”改成“All”(默认为“None”):

# 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
上面的是一段raksmart的linux的apache的配置文件,如果是虚拟主机可以直接在cpanel控制面板完成