Page 1 of 1
Syntax definition file for .htaccess?
Posted: Sat Dec 23, 2006 12:13 pm
by lost
Hi
How can I add a .htaccess to any Syntax definition file? Under configure -> Document classes I have already add the file "*.htaccess".
If I renamed .htaccess to text.htaccess, the Syntax is highlighted. But in the right file .htaccess it doesn't work.
Greetings
Lost
Posted: Sun Dec 24, 2006 8:27 am
by MudGuard
Have you tried without the asterisk?
Posted: Sun Dec 24, 2006 3:07 pm
by lost
yes, sure
Posted: Thu Jan 04, 2007 8:55 pm
by PeteTheBloke
I think this might be a Windoze issue more than a TP issue.
I have .htaccess files that I have FTPed from websites, but I can't rename a file to .htaccess in Windoze - it simply won't allow me.
The problem comes from the fact that the OS uses file extensions to recognise filetypes whereas *NIX (including Macs) looks at the file and works it out.
I think

Posted: Fri Jan 05, 2007 12:36 pm
by BenjaminB
PeteTheBloke wrote:I have .htaccess files that I have FTPed from websites, but I can't rename a file to .htaccess in Windoze - it simply won't allow me.
It should work if you use the commandline. (Start->run->"cmd") Just type "ren [filename].[extension] .htaccess". Notepad can save files as .htaccess, too.
By the way: I tried syntax highlighting for .htaccess files and it works perfectly.
lost wrote:Under configure -> Document classes I have already add the file "*.htaccess".
Are you _sure_, that you added ".htaccess" _without_ the "*"? Because this sounds like you did not:
lost wrote:If I renamed .htaccess to text.htaccess, the Syntax is highlighted.
Posted: Fri Jan 05, 2007 1:18 pm
by MudGuard
BenjaminB wrote:Notepad can save files as .htaccess, too.
Textpad can do that as well - so there is no need to use horrible things like Notepad ...
Posted: Fri Jan 05, 2007 5:09 pm
by lost
BenjaminB wrote:Are you _sure_, that you added ".htaccess" _without_ the "*"? Because this sounds like you did not:
Yes, I'm sure that I have only .htaccess without the * (I know, I had written in my first post with *

)
I use the Syntax definition file "php-js-css-html.syn". In this file, I have added "RewriteRule", but nothing happens in the .htaccess. Only http-Links are blue.
Posted: Sun Jan 07, 2007 12:20 am
by MudGuard
Please open that syntax file.
What does it say in the first few lines?
Is there a
HTML = 1
?
If so, syntax coloring does only take place between < and > as far as I know (you could verify that by putting <RewriteRules> for a test in your file)
I do not understand why you chose a syntax file that is for html + css + php + js for something totally unrelated like Apache configuration - why not use one of the Apache syntax files from
http://www.textpad.com/add-ons/syna2g.html ?
Posted: Tue Feb 20, 2007 11:35 am
by beychae
Check if you have "*." as a wildcard associated with another document class (I think the Text class has this by default).
If you remove this association, Textpad seems to allow other document classes to have members like ".htaccess" where the filename starts with a dot. Otherwise, they are all grabbed by the Text class.