Operating System - Linux
1752827 Members
3669 Online
108789 Solutions
New Discussion

Re: I want to disable default name Index of .....

 
Aamir14
Regular Advisor

I want to disable default name Index of .....

Hi,
 
on apache i want to disable (Index of) name please
 
For example:----
Index of /SOP/Finance
 
I want to disable default name index of .....
 
 
 
Thanks
Aamir
 

3 REPLIES 3
Matti_Kurkela
Honored Contributor

Re: I want to disable default name Index of .....

Do you want to disable the entire index, or just the title of the index page?

 

To disable the entire index, find the Options directive that affects this directory in your Apache configuration, and remove the "Indexes" keyword from it.

 

Or add something like this to the appropriate location in your Apache configuration:

<Location /SOP/Finance>
Options -Indexes
</Location

 

Or if "AllowOverride Options" is enabled in the main Apache configuration for this path,  just create a .htaccess file and write "Options -Indexes" to it.

 

-----

 

To disable/change just the title, you need a custom header.html file (you can name it as you wish, and put it anywhere you want). Then you'll need to put two directives in your Apache configuration:

HeaderName header.html
IndexOptions +SuppressHTMLPreamble

(If you want to put these in a .htaccess file, then "AllowOverride Indexes" must be enabled.)

 

 

The header.html file needs to contain something similar to this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
 <head>
  <title>Anything you want</title>
 </head>
<body>
<h1>Anything you want, or just remove this line completely</h1>

 

MK
Aamir14
Regular Advisor

Re: I want to disable default name Index of .....

Hi,

 

My question is that 

I want to disable Index of

 

Index of word  and change to 

Project 

 

Suppose when open any directory in Apache its open default naming convention(Index of .......) 

i want to disable Index of word not indexes

 

It is possible or not?

 

 

Thanks

aamir

 

Matti_Kurkela
Honored Contributor

Re: I want to disable default name Index of .....

Yes, it is possible - but there is no single convenient keyword for changing just the "Index of" title.

Instead, you must supply a custom header.html that replaces the standard text with whatever you want.

 

Read the second part of my previous answer (after the "-----").

MK