easyphp和.htaccess [英] easyphp and .htaccess

查看:270
本文介绍了easyphp和.htaccess的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要EasyPHP和.htaccess的帮助。



.htaccess文件无法正常工作,我认为这是因为我没有使用EasyPHP进行设置。 / p>

我的EasyPHP版本是 5.3.8.1



也许有人知道如何解决此问题问题?



.htaccess文件:



选项+关注符号链接



RewriteEngine on



RewriteRule ^ get /([[^ /] +)/func/get.php?link=$1 [NC]

解决方案

EasyPHP中的Apache默认安装未激活使用.htaccess文件修改文件夹中服务器配置的选项。



您必须告诉Apache可以通过.htaccess文件以及在哪个文件夹中更改哪些配置。要在主Web服务器上启用所有配置更改,应编辑 http.conf (在Apache / conf文件夹中),然后查找:

 <目录 $ {path} / www> 

#Options指令的可能值为 None, All,
#或以下任意组合:
#索引包括FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

#请注意, MultiViews必须命名为* explicitly * --- Options All
#不会提供给您。

#Options指令既复杂又重要。请参阅
#http://httpd.apache.org/docs/2.2/mod/core.html#options
#了解更多信息。

选项索引FollowSymLinks


#AllowOverride控制可以在.htaccess文件中放置哪些指令。
#可以是全部,无或关键字的任意组合:
#选项FileInfo AuthConfig Limit

AllowOverride无


#控制谁可以从该服务器获取内容。

允许订单,拒绝
允许所有

< / Directory>

并更改

  AllowOverride无

  AllowOverride全部

要更好地进行调整,请阅读文档关于 AllowOverride 的相关信息:
http: //httpd.apache.org/docs/2.2/mod/core.html#allowoverride



另外,请检查http.conf是否已激活mod_rewrite,

  #LoadModule rewrite_module modules / mod_rewrite.so 

并删除开头的#

  LoadModule rewrite_module modules / mod_rewrite。所以


I need help with EasyPHP and .htaccess .

The .htaccess file isn't working, I think its because I didn't setup something with EasyPHP.

My EasyPHP version is 5.3.8.1

Maybe anyone knows how to fix this problem ?

.htaccess file :

Options +FollowSymlinks

RewriteEngine on

RewriteRule ^get/([^/]+) /func/get.php?link=$1 [NC]

解决方案

Default installation of Apache in EasyPHP don't have activated the option to use .htaccess files to modify server configuration in folders.

You have to tell Apache what configuration can be changed with .htaccess files, and in which folder. To enable all config changes on main web server, you should edit http.conf (in Apache/conf folder), and look for:

<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>

and change

    AllowOverride None

to

    AllowOverride All

To better fine tune it, read documentation about AllowOverride in: http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride

Also, check that http.conf has mod_rewrite activated, look for:

#LoadModule rewrite_module modules/mod_rewrite.so

And remove the leading "#"

LoadModule rewrite_module modules/mod_rewrite.so

这篇关于easyphp和.htaccess的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆