You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Michael Avila <Mi...@sbcglobal.net> on 2005/11/29 05:01:14 UTC

[users@httpd] .htaccess Creation Under Windows

Is there a way to create an .htaccess file under Windows XP Pro? I would
like to locked down a directory from direct outside connection but Windows
does not like that type of filename. Would it be easier just to rename all
of the .htaccess files to something else and change the Apache conf file to
reflect the change? I prefer not to do that because of all of the
applications that come with .htaccess files. I'm liable to forget to rename
them.

Any suggestions?

Mike


Re: [users@httpd] .htaccess Creation Under Windows

Posted by Sanjay Dutt <sd...@touchtelindia.net>.
At 17:19 29/11/2005, Rich Bowen wrote:

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Michael Avila wrote:
> > Is there a way to create an .htaccess file under Windows XP Pro? I would
> > like to locked down a directory from direct outside connection but Windows
> > does not like that type of filename. Would it be easier just to rename all
<snip>
>Usually, in any application, you can "save as" and then put the name
>.htaccess in quotes.
<snip>
>- --
>Rich Bowen

Hey I had totally forgotten about this. Thanks Rich!
Sanjay Dutt


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.362 / Virus Database: 267.13.10/186 - Release Date: 29/11/2005



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] .htaccess Creation Under Windows

Posted by Michael Avila <Mi...@sbcglobal.net>.
EXCELLENT!

I have received several excellent ideas!

Thanks to all.

-----Original Message-----
From: Rich Bowen [mailto:rbowen@rcbowen.com]
Sent: Tuesday, November 29, 2005 6:50 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] .htaccess Creation Under Windows


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Avila wrote:
> Is there a way to create an .htaccess file under Windows XP Pro? I would
> like to locked down a directory from direct outside connection but Windows
> does not like that type of filename. Would it be easier just to rename all
> of the .htaccess files to something else and change the Apache conf file
to
> reflect the change? I prefer not to do that because of all of the
> applications that come with .htaccess files. I'm liable to forget to
rename
> them.

Usually, in any application, you can "save as" and then put the name
.htaccess in quotes.

Alternately, if you don't want to do that, then set the AccessFileName
directive to something else:
http://httpd.apache.org/docs/2.0/mod/core.html#accessfilename or
http://httpd.apache.org/docs/1.3/mod/core.html#accessfilename for 1.3

- --
Rich Bowen
rbowen@rcbowen.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDjEBmXP03+sx4yJMRAl8eAKCP4MNF6w8Bjod5UqSGDX8W0vdg5ACeICHq
rYdo+2FimRdFELyVHsvJr+8=
=zx6r
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] .htaccess Creation Under Windows

Posted by Rich Bowen <rb...@rcbowen.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michael Avila wrote:
> Is there a way to create an .htaccess file under Windows XP Pro? I would
> like to locked down a directory from direct outside connection but Windows
> does not like that type of filename. Would it be easier just to rename all
> of the .htaccess files to something else and change the Apache conf file to
> reflect the change? I prefer not to do that because of all of the
> applications that come with .htaccess files. I'm liable to forget to rename
> them.

Usually, in any application, you can "save as" and then put the name
.htaccess in quotes.

Alternately, if you don't want to do that, then set the AccessFileName
directive to something else:
http://httpd.apache.org/docs/2.0/mod/core.html#accessfilename or
http://httpd.apache.org/docs/1.3/mod/core.html#accessfilename for 1.3

- --
Rich Bowen
rbowen@rcbowen.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDjEBmXP03+sx4yJMRAl8eAKCP4MNF6w8Bjod5UqSGDX8W0vdg5ACeICHq
rYdo+2FimRdFELyVHsvJr+8=
=zx6r
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] .htaccess Creation Under Windows

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Michael Avila wrote:
> Is there a way to create an .htaccess file under Windows XP Pro? I would
> like to locked down a directory from direct outside connection but Windows
> does not like that type of filename.

Windows likes most filesnames if you put them in quotes.  Even try saving
a file from notepad as ".htaccess" - it loves it.

Your problem is that MS tools are bad with file names and extentions, but then
again, so is Mac OS/X and most any other squishy-GUI-feelgood user interface.

Another FYI - if you want to save the file "NOTICE", you have to quote it from
notepad or it's saved as "NOTICE.txt" - I don't see this is any different.

> Would it be easier just to rename all of the .htaccess files to something 
> else and change the Apache conf file to reflect the change?

That would contradict and make the docs harder to follow, so as distributed,
httpd on win32 uses .htaccess

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] .htaccess Creation Under Windows

Posted by Michael Avila <Mi...@sbcglobal.net>.
As the message said, I install apps with the .htaccess file as part of the
ZIP file and it works okay. Yet Windows rejects creating that type of file
through Windows Explorer. However, several people, including yourself, have
shown me excellent ideas on how to do it. So I do believe that I am all set
now.

Thanks.

-----Original Message-----
From: Jim Walls [mailto:k6ccc@earthlink.net]
Sent: Monday, November 28, 2005 11:39 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] .htaccess Creation Under Windows


Michael Avila wrote:

> Is there a way to create an .htaccess file under Windows XP Pro? I would
> like to locked down a directory from direct outside connection but Windows
> does not like that type of filename. Would it be easier just to rename all
> of the .htaccess files to something else and change the Apache conf file
to
> reflect the change? I prefer not to do that because of all of the
> applications that come with .htaccess files. I'm liable to forget to
rename
> them.

I was about to say that you were crazy because I have no problem with
.htaccess on my server.  However a little further testing and I found
you were right.  I also found a partial workaround however...  Let me
explain my network and the testing I did.

I have Apache running on a Windows 2000 Server computer.  Most of the
management (including .htaccess stuff), I do from this Windows XP
computer with the C: drive on the server mapped as Z: on this XP box.  I
have no problems at all reading or editing an existing .htaccess file on
the XP computer.  However, as you reported, I could not create a new
.htaccess file on the XP computer.  I could even copy an existing
.htaccess file (either locally on the XP computer or remotely from the
2000 server) to the local XP computer and then edit it.

The workaround would be create a .htaccess file on another computer and
copy it via a floppy, USB drive, CD, etc to your XP computer.  I even
tried sending myself an e-mail with a .htaccess file as an attachment.
When I received it on the XP computer, I had no problem saving it, and
then reading, copying, or editing it.  To that end, I will happily send
you a dummy .htaccess file as an attachment.  If your computer is like
mine, you should then be able to edit or copy it to fit your needs.


--
73
-------------------------------------
Jim Walls - K6CCC
k6ccc@amsat.org
Ofc:  818-548-4804
http://home.earthlink.net/~k6ccc
AMSAT Member 32537 - WSWSS Member 395


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] .htaccess Creation Under Windows

Posted by Jim Walls <k6...@earthlink.net>.
Michael Avila wrote:

> Is there a way to create an .htaccess file under Windows XP Pro? I would
> like to locked down a directory from direct outside connection but Windows
> does not like that type of filename. Would it be easier just to rename all
> of the .htaccess files to something else and change the Apache conf file to
> reflect the change? I prefer not to do that because of all of the
> applications that come with .htaccess files. I'm liable to forget to rename
> them.

I was about to say that you were crazy because I have no problem with 
.htaccess on my server.  However a little further testing and I found 
you were right.  I also found a partial workaround however...  Let me 
explain my network and the testing I did.

I have Apache running on a Windows 2000 Server computer.  Most of the 
management (including .htaccess stuff), I do from this Windows XP 
computer with the C: drive on the server mapped as Z: on this XP box.  I 
have no problems at all reading or editing an existing .htaccess file on 
the XP computer.  However, as you reported, I could not create a new 
.htaccess file on the XP computer.  I could even copy an existing 
.htaccess file (either locally on the XP computer or remotely from the 
2000 server) to the local XP computer and then edit it.

The workaround would be create a .htaccess file on another computer and 
copy it via a floppy, USB drive, CD, etc to your XP computer.  I even 
tried sending myself an e-mail with a .htaccess file as an attachment. 
When I received it on the XP computer, I had no problem saving it, and 
then reading, copying, or editing it.  To that end, I will happily send 
you a dummy .htaccess file as an attachment.  If your computer is like 
mine, you should then be able to edit or copy it to fit your needs.


-- 
73
-------------------------------------
Jim Walls - K6CCC
k6ccc@amsat.org
Ofc:  818-548-4804
http://home.earthlink.net/~k6ccc
AMSAT Member 32537 - WSWSS Member 395


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] .htaccess Creation Under Windows

Posted by Michael Avila <Mi...@sbcglobal.net>.
EXCELLENT!

I have received several excellent ideas!

Thanks to all.

-----Original Message-----
From: Sanjay Dutt [mailto:sdutt@touchtelindia.net]
Sent: Tuesday, November 29, 2005 2:07 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] .htaccess Creation Under Windows



At 09:31 29/11/2005, you wrote:

>Is there a way to create an .htaccess file under Windows XP Pro? I would
>like to locked down a directory from direct outside connection but Windows
>does not like that type of filename. Would it be easier just to rename all
>of the .htaccess files to something else and change the Apache conf file to
>reflect the change? I prefer not to do that because of all of the
>applications that come with .htaccess files. I'm liable to forget to rename
>them.
>
>Any suggestions?
>
>Mike

Save the file as anyfilename.txt using any text editor under XP. Open
a console window in that directory and give the command 'ren
anyfilename.txt .htaccess' (without the quotes, of course) and press
'Enter'. Do a dir listing to confirm that its done. Close the console
window.

Sanjay Dutt


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.362 / Virus Database: 267.13.8/184 - Release Date: 27/11/2005



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] .htaccess Creation Under Windows

Posted by Sanjay Dutt <sd...@touchtelindia.net>.
At 09:31 29/11/2005, you wrote:

>Is there a way to create an .htaccess file under Windows XP Pro? I would
>like to locked down a directory from direct outside connection but Windows
>does not like that type of filename. Would it be easier just to rename all
>of the .htaccess files to something else and change the Apache conf file to
>reflect the change? I prefer not to do that because of all of the
>applications that come with .htaccess files. I'm liable to forget to rename
>them.
>
>Any suggestions?
>
>Mike

Save the file as anyfilename.txt using any text editor under XP. Open 
a console window in that directory and give the command 'ren 
anyfilename.txt .htaccess' (without the quotes, of course) and press 
'Enter'. Do a dir listing to confirm that its done. Close the console window.

Sanjay Dutt


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.362 / Virus Database: 267.13.8/184 - Release Date: 27/11/2005



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org