Configure PhpStorm to use .htaccess

前端 未结 2 1645
有刺的猬
有刺的猬 2020-12-19 04:56

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.

2条回答
  •  伪装坚强ぢ
    2020-12-19 05:38

    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.

提交回复
热议问题