Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i create an .htaccess file in windows?

Status
Not open for further replies.

volatox

Technical User
Feb 9, 2001
1
0
0
CA
i'm just learning how to use Apache and i need to limit access on certain web pages. (this is a school project). How do i use the .htaccess file to block a certain ip and inversely how do i limit access to only one ip?

thanks,
Jacob
 
I would also like to know how to create an .htaccess file in WinNT4 ----> the obvious problem is that windows won't allow a file with an extension, but no filename.

What's the solution??

Thanks,

Jonathan
 
Hi,

Windows does allow a .htaccess file..

Open notepad and copy the following into it:


AuthUserFile /AuthGroupFile /dev/null
AuthName "Restricted Area"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>

Click &quot;SAVE AS&quot; then save as .htaccess but make sure that you have all file types selected.

Hope this helps Wullie

 
Thanks for that Wullie - but I've already tried that.

If I select Save as type = All Files, and type in .htaccess , notepad still puts a .txt after it. If I try and delete the .txt in Win Explorer, I get an alert: &quot;You must type a filename&quot;.

Using WinNT4 SP6.

Anyone got round this before??

Ta - Jonny.
 
Hi,

You can just change the .htaccess convention to something else in httpd.conf via the 'AccessFileName' directive. For example :

AccessFileName .htaccess

could become ...

AccessFileName ht.acl


Hope this helps
 
But how do you create the htpasswd file in windows?
Thats the biggie. :|
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top