views:

35

answers:

2

When working with htaccess files on Windows, is it possible to save the file as .htaccess ? (Rather than having to rename on LAMP server)

+1  A: 

You can use the Windows command line or Powershell to rename a file, or you could simply go to the desired directory and make it with notepad .htaccess. It'll prompt if you want to create the file, click "yes," and you're done.

derekerdmann
ah yes. the old windows `cmd` rename..
ina
Or, just use Explorer. You have to have file extensions turned on, though.
Mike Caron
@Mike - Nope, in Vista and 7, Explorer won't let you only use ".htaccess" - it tells you that "You must type a file name."
derekerdmann
@derekerdmann Huh. That's strange... I could have sworn that I've done this in XP... Maybe not though...
Mike Caron
@Mike - Just checked using XP Mode, and it doesn't look like XP lets you rename to ".htaccess" either. There might be a setting that would allow it, but I doubt it's easy to find.
derekerdmann
Yup, I remember doing this in XP native years ago - but in Win 7 - it won't let you rename to .filename in Explorer
ina
+3  A: 

Use notepad, save the file as ".htacess" using double quotes around the name to ignore illegal characters.

Shannon
this is clever! but i stay away from notepad since it often messes up the file due to windows memory handling errors
ina