This is a discussion on Forward compatibility html to x html with mod rewrite? within the Apache Web Server forums, part of the Web Server and Related Forums category; With the Apache URL Rewriting Guide is is relative easy to make a website backward compatible. See http://httpd.apache....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
With the Apache URL Rewriting Guide is is relative easy to make a website backward compatible. See http://httpd.apache.org/docs/2.0/misc/rewriteguide.html .
But is it also possible to make it "forward compatible"? That is serve all html-pages as xhtml if the browser accepts xhtml. So all pages remain *.html for IE and present links, but are altered on the fly to xhtml with the correct mime type application/xhtml+xml. Of course, all pages are correct xhtml files. The question is how? My try is below, but doesn't not work. AddType application/xhtml+xml .xhtml <Directory "/var/www/alforto.nl"> Options +FollowSymLinks RewriteEngine on # Our conditions are that the browser must accept XHTML RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml # If it accepts xml than rewrite html to xhtml RewriteRule *.html$ *.xhtml [L] </Directory> Arjen |