SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    .htaccess on windows platform

    Am trying to mirror linux server on my desktop - for more expedient development and practice!

    I have come across a problem with .htaccess. Being windows, that filename isn't allowed - and I have no idea what the equivelent to htpassswd -c is....

    Is there a different method for windows or is it simply not possible?
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  2. #2
    That's Right. notepad_coder's Avatar
    Join Date
    Apr 2002
    Location
    Colorado
    Posts
    835
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Windows should allow you to save a file as .htaccess and .htpasswd, it let me when I amde mine.
    - the lid is off the maple syrup again!

  3. #3
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Nope, tells me I MUST type in a file name (sees .htaccess as the extension).
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  4. #4
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe in some versions of Windows you can specify .htaccess as a filename. WinXP and NT you cannot. Even if you could though, .htaccess is a Linux COMMAND not a Windows one and so even if you could rename it it won't do what an .htaccess file would do on a linux box

    There's various things that can be substituted, H. If it's a matter of password protection, the same can be achieved through file and folder permissions. If it's a matter of MIME type, then the File associations must be set, etc.

    Sketch
    Aaron Brazell
    Technosailor



  5. #5
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Aha - in my ignorance I thought .htaccess was an apache specific thing (running apache on Win 98). Got .htpasswd.exe to work ok, which kicked out a .htpasswd file - I just have no idea how it did it!!

    I really just wanted to muck around with various .htaccess toys, without the danger of doing it on the live server. Guess I'll have to take the chance....
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  6. #6
    That's Right. notepad_coder's Avatar
    Join Date
    Apr 2002
    Location
    Colorado
    Posts
    835
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm on WinXP Pro and all i had to do is open my text editor (Maguma) and it let me save a file as .htaccess without any problems.
    Last edited by notepad_coder; Apr 12, 2002 at 06:27.
    - the lid is off the maple syrup again!

  7. #7
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Sketch
    I believe in some versions of Windows you can specify .htaccess as a filename. WinXP and NT you cannot. Even if you could though, .htaccess is a Linux COMMAND not a Windows one and so even if you could rename it it won't do what an .htaccess file would do on a linux box
    .htaccess is a file, not a command. the directives should generally work exactly the same on Windows as *nix.

    H, just make a file in Notepad. when you save it, put the name in quotes. e.g. ".htaccess" -- should work.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  8. #8
    I'm NOT an Addict ! TheRock's Avatar
    Join Date
    Jul 2001
    Location
    Earth ... maybe
    Posts
    401
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Either Put the name in quotes " ", or save it as abc.htaccess and then goto command prompt and rename it to ".htaccess"
    -*-
    B-School Forums - GMAT / MBA / Admissions discussions
    -*-


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •