Jump to content

.htaccess directory listing and error pages

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
dirkfirst

dirkfirst

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 354 posts
I need to disable directory listing ability on one of my websites and would like to do this with .htaccess.

I also need to forward the user to a php file in the event of an error page. How is this done?

Thanks for your help! :D

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Remove Directory Listing
Options -Indexes
Forward to Error Page:
ErrorDocument 404 /error.php
ErrorDocument 403 /error.php


#3
dirkfirst

dirkfirst

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 354 posts
Yup, that is what I needed. Is it better to handle things like this in the http.conf?