I run a site wich is externally hosted, so I have no control over Apache per se. I am trying to use .htaccess with some limited success but would appreciate some help.
My host appears to have '+Indexes' as the default as any folder can be browsed. I want to stop this, and provide 'home grown' error pages.
I put
Options -Indexes
ErrorDocument 401 /error_docs/unauthorised.html
ErrorDocument 403 /error_docs/forbidden.html
ErrorDocument 404 /error_docs/not_found.html
ErrorDocument 500 /error_docs/internal_server_error.html
In the root - and that worked, stopping browsing in all folders
I then wanted to enable browsing in 1 particular folder
so I put
Options +Indexes
in that folder - it didnt work. why?
I changed the root .htaccess - took out '-Indexes'
to use the default which is 'enabled browsing'
and then put '-Indexes' in every other folder except the one I want to browse - that worked - but seems to me to be the wrong way to go about it
i.e. stop all and permit specific is more secure.
Comments / help Please?
Also with the '-Indexes' in the /cgi-bin/ folder .pl scripts dont execute and email form falls over - so I took it out and at the moment that folder can be browsed
Again - help please
Allan
My host appears to have '+Indexes' as the default as any folder can be browsed. I want to stop this, and provide 'home grown' error pages.
I put
Options -Indexes
ErrorDocument 401 /error_docs/unauthorised.html
ErrorDocument 403 /error_docs/forbidden.html
ErrorDocument 404 /error_docs/not_found.html
ErrorDocument 500 /error_docs/internal_server_error.html
In the root - and that worked, stopping browsing in all folders
I then wanted to enable browsing in 1 particular folder
so I put
Options +Indexes
in that folder - it didnt work. why?
I changed the root .htaccess - took out '-Indexes'
to use the default which is 'enabled browsing'
and then put '-Indexes' in every other folder except the one I want to browse - that worked - but seems to me to be the wrong way to go about it
i.e. stop all and permit specific is more secure.
Comments / help Please?
Also with the '-Indexes' in the /cgi-bin/ folder .pl scripts dont execute and email form falls over - so I took it out and at the moment that folder can be browsed
Again - help please
Allan