This is a discussion on Using mod_rewrite to change MIME types within the Apache Web Server forums, part of the Web Server and Related Forums category; I have the following code in my httpd.conf in an attempt to direct users away from a certain page ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have the following code in my httpd.conf in an attempt to direct users away
from a certain page if their browser doesn't support XUL. However, all the HTML files in the directory are sent as application/xhtml+xml which will break non-Mozilla browsers, so I need to add the [T] flag to the end of the line. I get a 400 (bad request) returned from the server when using non-XUL browsers. Is there something obviously wrong here? RewriteEngine On RewriteLogLevel 2 RewriteLog logs/rewrite.log RewriteCond %{HTTP_USER_AGENT} !Gecko [OR] RewriteCond %{HTTP_USER_AGENT} Safari RewriteRule ^/mike/chrome/chrome\.xul$ /mike/chrome/nongecko.html [L,T=text/html] My log file says: 127.0.0.1 - - [24/Jun/2003:13:56:00 --0700] [localhost/sid#23bb50][rid#46acc8/initial] (2) init rewrite engine with requested uri /mike/chrome/chrome.xul 127.0.0.1 - - [24/Jun/2003:13:56:00 --0700] [localhost/sid#23bb50][rid#46acc8/initial] (2) rewrite /mike/chrome/chrome.xul -> /mike/chrome/nongecko.html 127.0.0.1 - - [24/Jun/2003:13:56:00 --0700] [localhost/sid#23bb50][rid#46acc8/initial] (2) remember /mike/chrome/nongecko.html to have MIME-type 'text/html' 127.0.0.1 - - [24/Jun/2003:13:56:00 --0700] [localhost/sid#23bb50][rid#46acc8/initial] (2) local path result: /mike/chrome/nongecko.html Thanks for any help! |
| Thread Tools | |
| Display Modes | |
|
|