You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

creating htaccess file without extension?

I am trying to create both the htaccess and htpasswd files, however TextEdit insists on adding the file extension. I have performed a Get Info on these files and erased the extension and I have to force it to use a filename that begins with a period and no extension. It's accepted, but can I be sure the file is valid? I am saving the files in Plain Text.

Is TextEdit capable of creating the files I need?

How do I set the Read/Write parameters (644?) to be sure they are properly protected?

Each time I attempt to upload these files using Transmit set to ASCII transfer mode, it hesitates and tells me the files may not be in the proper format and asks if I want to override the settings to which I say yes. However, the authentication (login/pass) process still fails... it tells me I have entered the wrong pass.

I am using the site below to create the code necessary for my text files:

http://tools.dynamicdrive.com/password/

Once I have cut and pasted the code I am saving it in the TextEdit file.

TIA

Posted on Oct 4, 2005 2:29 PM

Reply
2 replies

Oct 4, 2005 7:45 PM in response to G4Dualie (Michael)

First, yes, TextEdit can do this for you. First, make sure that you are using Plain Text format (Format->Make Plain Text). Then go ahead and save the file and close out of it.

Next, in the Finder, do a Get Info on your file. Expand the Name & Extension field and delete out the ".txt" bit of your file name.

Note -- naming a file with a "." as the first character is sort of uncool with the Finder. You can do it, but your file will be invisible -- you'll have to go into the Terminal to deal with it. If you save it with a "." as the first character, you won't be able to do the Get Info bit. So, save it without the "." and then upload it and change the name to include the "." when it's on the server, after you've uploaded it.

TextEdit aside, if you don't want to deal with a command-line text editor, download TextWrangler and when you install it make sure to install the command line tools, just for added features. At least in my quick test, TextWrangler does not add an extension by default. It even has "Save to FTP Server" options. After you save it to your site, in TextWrangler's FTP window just choose Get Info and set the permissions however you want. (Plus, the ability to invoke it from the command line on any file is nice, particularly for really long config files like Apache's.)

Otherwise, yeah, get familiar with some command line editor and a few commands. Setting permission on the command line would be like this:
<code>chmod 644 name of_yourfile</code>

creating htaccess file without extension?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.