I want to display all of the files in my /public_html directory so I added following file to my .htaccess Options +Indexes Code (markup): Then I wanted to add a custom header with <dictype so I added this line to .htaccess IndexOptions FancyIndexing HeaderName /icon/header.html ReadmeName /icon/footer.html Code (markup): Now the doctype was printed twice so I added to remove extra dictype here is what my header looks like <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Site name</title> <link href="sitestyle.css" rel="stylesheet" type="text/css" /> </head> <body> HTML: Now for each and every directory the title does not change. How can I make the title dynamic so that it displays the directory name?