Page 1 of 1

htaccess syntax file

Posted: Fri Jul 24, 2009 10:07 am
by Nick
What syntax file should i use for htaccess files?
I have a couple of apache syntax files but neither work on .htaccess or foo.htaccess
I have class members set to .htaccess and *.htaccess

Re: htaccess syntax file

Posted: Mon Jul 27, 2009 9:18 am
by kAlvaro
Nick wrote:What syntax file should i use for htaccess files?
I have a couple of apache syntax files but neither work on .htaccess or foo.htaccess
I have class members set to .htaccess and *.htaccess
The syntax file for Apache configuration is called conf.syn.

Your class members look good to me but, for whatever reason, it doesn't always work.

Posted: Mon Jul 27, 2009 9:48 am
by Nick
I've just downloaded conf.syn and it doesn't seem to do anything, curiously the first line in the file is
; TextPad syntax definitions for Java

conf.syn is very similar to apache13.syn (but c.75 lines shorter) which I use with httpd.conf

I've managed to get both of them to work, but every time a .htaccess (or foo.htaccess) file is opened syntax highlighting has to be enabled specifically for that document - is this a bug?

Posted: Mon Jul 27, 2009 11:22 am
by kAlvaro
I suppose you are referring to http://www.textpad.com/add-ons/files/sy ... dconf1.zip. Yes, there's a typo in the comment, but it does indeed contain Apache directives (although the list of keywords is very incomplete).

As about no loading automatically, if it isn't a bug I haven't been able to find the configuration error. I've always seen it behave randomly in different computers. Perhaps there's another document class that's picking the file :?:

Posted: Mon Jul 27, 2009 11:43 am
by Nick
- that's the one.

I've now put .htaccess and foo.htaccess into the same class as httpd.conf rather than in one of their own and as if by magic foo.htaccess has the syntax highlighted, but it still has to be set manually for .htaccess - well at least I know now!