Index of...

Status
Not open for further replies.

lgpro01

New Member
Messages
9
Reaction score
0
Points
0
Hi
How can you stop 'Index of /home/' thing from coming up when you go to a folder with know index?

Thanks
 

adamparkzer

On Extended Leave
Messages
3,745
Reaction score
81
Points
0
Hi
How can you stop 'Index of /home/' thing from coming up when you go to a folder with know index?

Thanks

Hi lgpro01,

Add the following line of code to your .htaccess file:

DirectoryIndex index.php

Your .htaccess file can be found by enabling the viewing of hidden files. If there isn't one created already in public_html, you can create a new one yourself. If your index file is named differently than index.php, be sure to modify the code above as necessary.

- Adam
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Add

Code:
Options -Indexes

to .htaccess . That way, if you do not have an index.xxx file in the directory, it will not display an directory listing page, but instead generate a "403 - Forbidden" message.
 
Last edited:
Status
Not open for further replies.
Top