Author |
|
fabiofranco.php
Joined: 23 Jan 2007 Posts: 3 Location: Brazil
|
Posted: Tue 23 Jan '07 15:41 Post subject: Great doubt about .htaccess file on Windows |
|
|
Well, i need any help.
This is my problem: i'm the manager of a apache server on windows xp pro... and i wanna improve security of my server. so, i tried to set the .htaccess but i dont get it, i dont know why.
Look, on linux platform we can make a file so-called ".htaccess", but on windows we cant make it. On windows we just can make a file so-called "something.htacces" or some like this. So, what can i do? .htaccess files only works in linux???
If it works in windows too... what must i do?
thanks for your help
Fabio Franco, from Brazil |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7405 Location: EU, Germany, Next to Hamburg
|
Posted: Tue 23 Jan '07 17:49 Post subject: |
|
|
create a file something.htaccess and in console (cmd)
Code: |
ren something.htaccess .htaccess
|
Easier: You can change access file name in httpd.conf
AccessFileName .htaccess
maybe change to
AccessFileName a.htaccess
than Apache will parse all a.htaccess which is a valid name in windows. |
|
Back to top |
|
fabiofranco.php
Joined: 23 Jan 2007 Posts: 3 Location: Brazil
|
Posted: Tue 23 Jan '07 19:44 Post subject: thanks |
|
|
Hei man, tanks a lot for your answer. i will try what you told.
thanks |
|
Back to top |
|
fabiofranco.php
Joined: 23 Jan 2007 Posts: 3 Location: Brazil
|
Posted: Tue 23 Jan '07 20:06 Post subject: YYEESS |
|
|
it's works... thanks a lot... i get it!!!! |
|
Back to top |
|
halfer
Joined: 31 Jan 2007 Posts: 19
|
Posted: Wed 31 Jan '07 18:40 Post subject: |
|
|
It's probably worth your reading up on the Windows file system if you are managing a server. The restriction on creating files prefixed with a dot is in the GUI only - it can be done at the command line. Simply type:
Code: | cd C:\web-server-folder
echo > .htaccess |
This will create a blank htaccess file for you. Make sure you don't do this over the top of a pre-existing htaccess file, as it will empty it! |
|
Back to top |
|
strigoi
Joined: 15 Dec 2005 Posts: 36
|
Posted: Thu 01 Feb '07 12:36 Post subject: hmmm |
|
|
not sure if this is too little too late, but heres how you make .htaccess in windows, and yes .htaccess works fine with windows.
open a new text document, place whatever you need into it.
up top, file > Save as
set the drop down menu to All FILES, name the new text doc .htaccess when thats done your done.
enjoy |
|
Back to top |
|
Jorge
Joined: 12 Mar 2006 Posts: 376 Location: Belgium
|
Posted: Fri 02 Feb '07 18:12 Post subject: |
|
|
. came from unix where all .something files are hidden. Windows indeed doesn't like it but it isn't imposible as posted above |
|
Back to top |
|