Alternative name for .htaccess

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 3
Joined: 09 Aug 2016, 07:30

Alternative name for .htaccess

09 Aug 2016, 07:47

We have recently moved to Ape from Isapi Rewrite 3 due to a server upgrade. Previously we had a httpd.conf file with a line changing the name of the rules files from .htaccess to main.htaccess. The rules file is written by a CMS that is unable to cope with filenames like .htaccess.

Making the same change to the Ape httpd.conf file is being ignored, and when I open the Helicon Ape module in IIS Manager it defaults to .htaccess. The comments in the httpd.conf file above this configuration refer to htaccess.txt as an alternative name.

I can manually copy the rules from the main.htaccess file to .htaccess and they are processed normally. Folder permissions have been checked as per the recommendations.

I am trying to discover whether Ape can only deal with two filenames for the rule files (.htaccess or htaccess.txt) or if there is some sort of caching going on that is stopping my changes being recognised

Many thanks for any suggestions

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Alternative name for .htaccess

09 Aug 2016, 13:38

Hello.

As per documentation https://www.helicontech.com/ape/doc/mod ... ssFileName please try the following line in httpd.conf:

AccessFileName main.htaccess

User avatar
Posts: 3
Joined: 09 Aug 2016, 07:30

Re: Alternative name for .htaccess

10 Aug 2016, 05:34

Thanks for getting back to me Yaroslav

I already have this setting in place - it seems to be being ignored. At least from your answer I know that it *should* work.

I have the httpd.conf file in C:\Program Files (x86)\Helicon\Ape and the application pool identity has permissions on this folder. If I open the Ape module in IIS at the Server level it opens a copy of the httpd.conf file from the GAC (C:\Windows\assembly\GAC_MSIL\Helicon.Ape.Editor\3.1.0.248__95bfbfd1a38437eb\httpd.conf) but this too has the setting for main.htaccess.

Am I missing something?

Thanks

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Alternative name for .htaccess

12 Aug 2016, 05:38

Hello.

I just found that 'AccessFileName' directive was not covered by tests. Since it is a rarely used feature it may have been broken for a while already without anybody notice, so may require time to fix. As a temporary solution would it be possible for you to use 'Include' directive instead? You can write .htaccess file with only:

Code: Select all
Include main.htaccess


in it. So your main.htaccess file will be loaded into the context. Unfortunately, documentation is not clear on whether changes to included files are automatically monitored or not, so please try it first.
I will try to provide fixed build as soon as possible anyway.

User avatar
Posts: 3
Joined: 09 Aug 2016, 07:30

Re: Alternative name for .htaccess

12 Aug 2016, 08:49

That's great - thanks for your help

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 21 guests