htaccess重写问题
我想将网址 http://mydomain/myapp/fakefolder 重写为 http://mydomain/myapp/index.php
我尝试了以下规则,但那不起作用
RewriteEngine On
RewriteRule ^fakefolder$ index.php
.htaccess 文件位于 myapp 内部。
请帮忙
谢谢 维内特
I want to rewrite the url http://mydomain/myapp/fakefolder to http://mydomain/myapp/index.php
I tried the following rule but thats not working
RewriteEngine On
RewriteRule ^fakefolder$ index.php
The .htaccess file is located inside myapp.
Kindly help
Thanks
vineet
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,您的文件夹不名为
vinetstore
:它名为fakefolder
。更正后的规则适用于我,所以我敢说您的 Apache 安装未配置为读取此类位置中的 .htaccess 文件。您可以轻松地进行测试:故意犯一个语法错误,然后查看您的网站是否崩溃。
找到您的虚拟主机或站点定义并确保您有此指令:
To begin with, your folder is not called
vineetstore
: it's calledfakefolder
.The corrected rule works for me so I'd dare say your Apache installation is not configured to read
.htaccess
files in such location. You can easily test that: make a syntax error on purpose and see whether your site crashes.Find your virtual host or site definition and make sure you have this directive: