Home | All Questions | alt.html FAQ > Server-side Includes (SSI)

What is the XBitHack?

XBitHack (pronounced "X bit hack") is an Apache webserver configuration that treats any html file with the execute bit set as a page that needs to be parsed for Server Side Includes. This allows an existing static website to make use of server-side includes on certain pages without the author having to wade through every page changing links to those pages.

The XBitHack is simply an .htaccess configuration statement, and allows the webmaster to specify pages that require server-side include directives on a file-by-file basis. The benefit of this is that not all pages with the same extension need to be parsed by the webserver for server side include directives, this saves a significant amount of processing power.

To switch on the XBitHack on an apache webserver, add the following line to the .htaccess file:

 XBitHack on

You need to set the execute bit of each file needing to be parsed. This is done by the Unix command chmod +x fileName.html. This can be done either through a telnet/ssh connection from the command line, or within most FTP clients check all the execute checkboxes.

Recommended Resources

Discussion

Related Questions