Forum Moderators: phranque

Message Too Old, No Replies

.htaccess on windows apache server

Windows file-naming conventions won't allow .htaccess filename

         

liquinas

6:28 am on Dec 7, 2003 (gmt 0)



I'm running an apache server on ex pee and wondering how (or if) I can set up a .htaccess file since wind0ze won't let me have something without a filename...

Any ideas?

jdMorgan

7:18 am on Dec 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



liquinas,

Welcome to WebmasterWorld [webmasterworld.com]!

You can specify the name to be used for (instead of) .htaccess using the AccessFileName directive; See
[httpd.apache.org...]

Jim

closed

8:46 am on Dec 7, 2003 (gmt 0)

10+ Year Member



Welcome to WebmasterWorld, liquinas!

I'm using XP too (I've also got Apache server on my box, but that's irrelevant). When you save your .htaccess file, you should save it as a text document, plus when you're asked for a file name, make sure to enclose it in quotes. For example, to save in Notepad, here are the values I would use:

File name: ".htaccess"
Save as type: Text documents (.txt)

KenB

4:13 pm on Dec 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I also use WinXP with Apache (for development purposes). To create a new .htaccess file I simply right mouse click in the folder I want to create the file and select "New"==>"Text document" then name the file ".htaccess" after that I can open it in my favorite text editor and make any changes I want.

jdMorgan

8:10 pm on Dec 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you specify AccessFileName once time in httpd.conf as I mentioned above, you won't have to mess with these problems each and every time you edit. You can name it "htaccess.txt" if you want.

Jim

closed

8:48 pm on Dec 8, 2003 (gmt 0)

10+ Year Member



Jim:

If you specify AccessFileName once time in httpd.conf as I mentioned above, you won't have to mess with these problems each and every time you edit.

You really only have to deal with the problem once: when the file is created.

If the .htaccess files are in multiple directories, and you have to upload them to a shared server, it would be time-consuming to rename the files every time they're uploaded.

In the description for this thread, it says:

Windows file-naming conventions won't allow .htaccess filename

I was just trying to show that that statement wasn't true.