配置PhpStorm使用的.htaccess [英] Configure PhpStorm to use .htaccess

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

问题描述

我添加的.htaccess (用于重写URL)在我的项目的根目录,但它不工作。我检查了两次,相同的文件是工作的罚款在Eclipse。

如何配置PhpStorm使用的.htaccess?

与PhpStorm和Eclipse工作时解决方案

您是否使用相同的服务器/配置?

由于这是在评论中解释说,它没有任何关系的IDE,但与Web服务器(Apache)和它的配置。

您可以编辑的.htaccess 使用任何编辑器,如果这个虚拟主机/目录下的配置具有的 的AllowOverride全部 ,ModRewrite被启用,你的重写规则是正确的,它会工作得很好

您需要确保你的PHP文件从正确配置的Web服务器提供服务。

I added .htaccess (for rewriting URLs) in my project's root directory but it's not working. I checked twice, the same file is working fine in Eclipse.

How do I configure PhpStorm to use .htaccess?

解决方案

Do you use the same server/configuration when working with PhpStorm and Eclipse?

As it was explained in the comments, it has nothing to do with the IDE, but with the web server (Apache) and its configuration.

You can edit .htaccess with any editor, if this virtualhost/directory configuration has AllowOverride All, ModRewrite is enabled and your rewrite rules are correct, it will work just fine.

You need to ensure that your PHP files are served from the correctly configured web server.

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

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