Use distributed configuration files (.htaccess)
Distributed configuration files are used to make directory-based changes to the HTTP Apache Server configuration and usually have the name .htaccess.
If you are using a file with the name .htaccess, PhpStorm recognizes it as distributed configuration file and provides full coding assistance for it, so no additional steps are required from your side.
If you want to use a file with another name, you need to associate this full name or the corresponding pattern with the distributed configuration file type. After that, PhpStorm will treat any file with the name matching the specified pattern as a distributed configuration file and process it accordingly.
Check the Apache config (.htaccess) plugin
This functionality relies on the Apache config (.htaccess) plugin . The plugin comes bundled with PhpStorm, but if you observe any malfunction, make sure that the plugin is enabled.
Press Ctrl+Alt+S to open the IDE settings and select.
Open the Installed tab, find the Apache config (.htaccess) plugin, and make sure that the checkbox next to the plugin name is selected.
Associate a name pattern with the distributed configuration file type
In the Settings/Preferences dialog (Ctrl+Alt+S), and select .
Select Apache Config from the Recognized File Types list.
In the File name patterns area, click .
In the Add Wildcard dialog that opens, specify the pattern that defines the extensions of your distributed configuration files.
Click OK. PhpStorm returns you to the File Types page where the specified pattern is added to the File name patterns list.
To discard a pattern, select it in the list and click .
To change a pattern, select it in the list, click , and update the pattern as necessary in the Add Wildcard dialog that opens.