httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Seaton <>
Subject [users@httpd] mod_rewrite not applied to default files?
Date Sat, 25 Jun 2005 00:39:30 GMT

I'm using mod_rewrite to send .html files as application/xhtml+xml for 
agents that say they accept it, and text/html for all others, using 

At the moment I simply have a .htaccess file with

RewriteEngine on
RewriteCond %{REQUEST_FILENAME}     \.html$
RewriteCond %{HTTP_ACCEPT}          application/xhtml\+xml
RewriteRule .* - [T=application/xhtml+xml]

This works fine on, for example,, but it does not work on, for 
example, mod_rewrite doesn't seem to be 
applied when serving a default file for a directory.

I tested this by modifying my .htaccess to read

RewriteEngine on
RewriteRule .* - [T=application/xhtml+xml]

With this every file should be served as application/xhtml+xml, and they 
all were, apart from the default file for the directory - which still 
went out as the .html default of text/html.

I'm using Mozilla HTTP live headers to check the MIME type returned by 
the server.

Can anyone help? Thanks a lot.

Chris Seaton

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message