Re: I want to disable default name Index of ..... (188 Views)
Reply
Regular Advisor
Aamir14
Posts: 114
Registered: ‎07-04-2011
Message 1 of 4 (250 Views)

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
 

Please use plain text.
Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 2 of 4 (238 Views)

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
Please use plain text.
Regular Advisor
Aamir14
Posts: 114
Registered: ‎07-04-2011
Message 3 of 4 (193 Views)

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

 

Please use plain text.
Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 4 of 4 (188 Views)

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
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation