【发布时间】:2017-12-26 06:01:38
【问题描述】:
我的项目名称是 funfeesa,所有客户端页面都包含在“客户端”文件夹中。但是我想访问然后而不在 url 中写入客户端文件夹。 就像下面这样:
localhost/funfeesa/index.php
我在.htaccess 文件中尝试了许多规则,但都没有正常工作。
谁能帮帮我?
【问题讨论】:
标签: .htaccess url-rewriting localhost
我的项目名称是 funfeesa,所有客户端页面都包含在“客户端”文件夹中。但是我想访问然后而不在 url 中写入客户端文件夹。 就像下面这样:
localhost/funfeesa/index.php
我在.htaccess 文件中尝试了许多规则,但都没有正常工作。
谁能帮帮我?
【问题讨论】:
标签: .htaccess url-rewriting localhost
#prevent directory listing
Options -Indexes
IndexIgnore */*
#follow symbolic links
Options FollowSymlinks
RewriteEngine on
RewriteRule ^funfeesa/index.php(.+)?$ funfeesa/client/index.php/$1
尝试像上面那样访问你的 .htaccess 文件
如果它不起作用,请尝试从上述规则中删除 index.php,但我认为它应该起作用 :)
【讨论】:
Options -Indexes IndexIgnore */* 这行