Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-30-2002, 07:51 AM   PM User | #1
Leinad
New Coder

 
Join Date: Aug 2002
Location: Sydney, Australia
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Leinad is an unknown quantity at this point
.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!!!!
Leinad is offline   Reply With Quote
Old 08-30-2002, 08:22 AM   PM User | #2
chrisvmarle
Regular Coder

 
Join Date: Jun 2002
Location: the Netherlands
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
chrisvmarle is an unknown quantity at this point
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
chrisvmarle is offline   Reply With Quote
Old 08-31-2002, 12:38 PM   PM User | #3
freakysid
New Coder

 
Join Date: Aug 2002
Location: Sydney, Australia
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
freakysid is an unknown quantity at this point
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
freakysid is offline   Reply With Quote
Old 08-31-2002, 04:26 PM   PM User | #4
chrisvmarle
Regular Coder

 
Join Date: Jun 2002
Location: the Netherlands
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
chrisvmarle is an unknown quantity at this point
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
chrisvmarle is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:28 AM.


Advertisement
Log in to turn off these ads.