Page 1 of 1

Doing Apache stuff with Windows

Posted: Fri Sep 06, 2002 2:36 pm
by f1nutter
Hi guys,

My hosting account is based on Linux and allows .htaccess files for password protection/custom error pages etc. I have developed custom 404 pages and am looking at preventing hot linking to my images as well as future .htaccess functions.

I am using PWS with Win98. My first problem is that Windows will not allow me to name my files .htaccess or anything starting with a period. It says "You must type a filename".

1) Is there any way of sorting the filename name thing out
2) What would I need to enable me to serve these pages.

I cannot keep transfering my files and renaming them on the server and then testing, as I have limited connection time. PWS works well with ASP/Access and PHP/MySQL so I would like to stay with Windows only.

Cheers.

Posted: Fri Sep 06, 2002 2:44 pm
by m3mn0n
in dreamweaver you can name a file without any warning, if you do it in the windows directory browser, your sure to have them errors as i did.

If you don't have dreamweaver, try notepad. 8)

hope it helps...

Posted: Fri Sep 06, 2002 2:50 pm
by f1nutter
I haven't got dreamweaver. Notepad will allow you to name the file .htaccess, but will add .txt to the end, even if you change the "Save as type" box to *.* When I then delete the .txt from .htaccess.txt it complains.

Posted: Fri Sep 06, 2002 2:53 pm
by m3mn0n
Not when i use notepad...

hmm i just did and it worked fine..

make sure to unselect "Save As.." type from .txt to "*.* All Files"

then it should be ok to save it.

if your still having problems, maybe i can send you a blank one...

Posted: Fri Sep 06, 2002 9:34 pm
by lc
yeah... I doubt whether that's avoidable in win98. I just tried it and yer right. doesn't work.

So why not name it 1.htaccess , upload it , then rename it once it's on the server.

Not perfect, but should work.

Posted: Fri Sep 06, 2002 11:13 pm
by volka
it's only a restriction in the explorer (why ever).
just name it i.e. htaccess and open a console where you move the file to .htaccess .
Or get an editor that does not care about file extensions. I like ultraedit - but that's just a matter of opinion.


But I doubt PWS is supporting .htaccess-protection.
On the other hand there is http://www.apache-asp.org/. So you may want to turn over to apache ;)

Posted: Sat Sep 07, 2002 5:50 am
by f1nutter
For future reference:

I created my htaccess file in Notepad and saved the file as htaccess.txt . I then opened a DOS window and moved to the directory containing the htaccess file. Then I renamed the file through DOS.

Code: Select all

F:\> ren htaccess.txt .htaccess
ren is rename, space, then original filename, space, new file name.

I though Windows was based on DOS, so if DOS will do it why won't Windows -- over to you Bill!

PS. I'm downloading Apache now.

Posted: Sat Sep 07, 2002 8:34 am
by sjunghare
Create a FILE using a notepad as enter u r require text and make sure to select "Save As.." type from .txt to "*.* All Files" and file name in dobule quote ".htaccess" It works and I done it.

Posted: Sat Sep 07, 2002 9:05 am
by f1nutter
I hadn't enclosed it in double quotes, it works - pukka.

Now to configure Apache2 for Windows - don't go far guys!


Thanks.