Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: .htaccess ?!?!

  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    Sydney, Australia
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .htaccess ?!?!

    Hi all,

    I have a PHP and apache configuration in an NT box. I've noticed if I use NT instead of *nix, I would not be able to use the .htaccess property.. the question is, does NT have something similar to .htaccess ?

    I basically want to do:
    - show diff. error pages. e.g. display a customised 404page instead of the default.

    - Deny IP address

    - enable SSI

    - preventing Directory Listing.

    Thanks alot!!!!

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    the Netherlands
    Posts
    215
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can use .htaccess on NT. The only problem is how to get a file named ".htaccess", because this is not allowed on Windows systems.

    I've stuggled with this problem in Win98 and WinXP too and here's how I got it to work:

    • Start Notepad
    • Typ your .htaccess information
      for example:
      order allow,deny
      deny from 10.0.0.3
      allow from all
    • Save it to a file (.htaccess.txt would be nice)
    • Start MS-DOS- or Command-prompt
    • Goto the dir where you've saved .htaccess.txt
    • Typ "ren .htaccess.txt .htaccess" and hit enter
    • You could do a little check: "dir .*" [ENTER]


    Option 2:
    • Start MS-DOS- or Command-prompt
    • Goto the dir where want your .htaccess
    • Typ "edit .htaccess" [ENTER]
    • Typ your .htaccess information
    • Close the editor
    • You could do a little check: "dir .*" [ENTER]


    Hope this helps you out

    Mzzl, Chris

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    Sydney, Australia
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    There is a simpler way

    The name of the custom access file does not have to be .htaccess. In your apache httpd.conf file you use the AccessFileName directive to specify what the file name is. The reason why .htaccess has a dot at the beginning by convention is because this signifies a "hidden" file on *nix (and Mac too btw).

    http://httpd.apache.org/docs/mod/cor...accessfilename

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    the Netherlands
    Posts
    215
    Thanks
    0
    Thanked 0 Times in 0 Posts
    But the reason I have this solution is because I don't want to have to change filenames if I upload files to a *nix system. Upgrade or just to test compatibility and if I install a program (perl or PHP) wich has a .htaccess in some dirs I don't want to have to change these.

    Mzzl, Chris


  •  

    Posting Permissions

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