easyphp 和 .htaccess

发布于 2024-12-16 23:59:28 字数 345 浏览 3 评论 0原文

我需要 EasyPHP 和 .htaccess 的帮助。

.htaccess 文件不起作用,我认为这是因为我没有使用 EasyPHP 设置某些内容。

我的 EasyPHP 版本是 5.3.8.1

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

.htaccess 文件:

Options +FollowSymlinks

RewriteEngine on

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

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]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

王权女流氓 2024-12-23 23:59:28

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>

并更改

    AllowOverride None

    AllowOverride All

要更好地对其进行微调,请阅读有关 的文档允许覆盖
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.so

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
彻夜缠绵 2024-12-23 23:59:28

在本地网站上工作时,我通过添加网站路径(带有 .htaccess)作为虚拟主机来解决此问题。 Easyphp 有一个用于此目的的模块:“虚拟主机管理器”。这将自动处理httpd.conf

When working on a local website I fixed this problem by adding the website path (with the .htaccess) as a virtual host. Easyphp has got a module for this: 'Virtual Hosts Manager'. This wil automatically take care of the httpd.conf.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文