我需要EasyPHP和.htaccess的帮助.
.htaccess文件不起作用,我认为是因为我没有使用EasyPHP设置.
我的EasyPHP版本是5.3.8.1
也许有人知道如何解决这个问题?
.htaccess文件:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^get/([^/]+) /func/get.php?link=$1 [NC]
EasyPHP中Apache的默认安装没有激活使用.htaccess文件修改文件夹中的服务器配置的选项.
您必须告诉Apache可以使用.htaccess文件以及在哪个文件夹中更改哪些配置.要在主Web服务器上启用所有配置更改,您应该编辑http.conf(在Apache/conf文件夹中),并查找:
<Directory "${path}/www">
#
# 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
#
# 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 None
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
Run Code Online (Sandbox Code Playgroud)
并改变
AllowOverride None
Run Code Online (Sandbox Code Playgroud)
至
AllowOverride All
Run Code Online (Sandbox Code Playgroud)
要更好地对其进行微调,请阅读以下文档中的AllowOverride文档:http: //httpd.apache.org/docs/2.2/mod/core.html#allowoverride
另外,检查http.conf是否已激活mod_rewrite,查找:
#LoadModule rewrite_module modules/mod_rewrite.so
Run Code Online (Sandbox Code Playgroud)
并删除前导"#"
LoadModule rewrite_module modules/mod_rewrite.so
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11401 次 |
| 最近记录: |