John B
John B

Reputation: 471

Can PhpStorm resolve mod_rewrite rules in .htaccess when doing code analysis?

I have a bunch of mod_rewrite rules in my PHP project. When I commit to git PhpStorm runs a code analysis on what I'm committing, which is great, but it produces a bunch of warnings because links point to the rewritten URLs, not the actual PHP files, for example:

Warning:(103, 71) Cannot resolve file 'contact'

For a link like this:

<a href="/contact">get in touch</a>

Is there a way to make PhpStorm resolve the rewrite rules in my .htaccess file? Failing that, how do I turn this inspection off? I've tried unchecking Preferences > Editor > Inspections > HTML > Anchor reference problems but I'm still getting the warnings.

Upvotes: 3

Views: 1183

Answers (1)

LazyOne
LazyOne

Reputation: 165471

Is there a way to make PHPStorm resolve the rewrite rules in my .htaccess file?

No.

https://youtrack.jetbrains.com/issue/WI-1032 -- watch this ticket (star/vote/comment) to get notified on progress.

Failing that, how do I turn this inspection off? I've tried unchecking Preferences > Editor > Inspections > HTML > Anchor reference problems but I'm still getting the warnings.

Correct one is "Inspections | HTML | File reference problems"

Upvotes: 2

Related Questions