mod_rewrite 问题,可能与服务器配置有关?
我有以下代码:
RewriteEngine on
RewriteRule ^example/? test.php
当我点击 www.example.com/example 时,我给出以下内容:
在此服务器上找不到请求的 URL /m/f/example.com/public/test.php。
我已检查该模块是否已安装,它似乎正在执行某些操作,但无法正确显示文件。 Public 是站点所有文件所在的位置,test.php 也在那里。
I have the following code:
RewriteEngine on
RewriteRule ^example/? test.php
When I hit www.example.com/example I gives me the following:
The requested URL /m/f/example.com/public/test.php was not found on this server.
I have checked that the module is installed and it seems to be doing something, but won't display the file correctly. Public is where all the files of the site are and the test.php is there as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要一个RewriteBase。
添加行:
You need a RewriteBase.
Add the line: