Category: Apache configuration
.htaccess Rewrite questions
I have two of them :D:
#1. I want to rewrite the mime-type for any files with the extension of .xhtml or .xml to text/html IF the user agent contains an instance of "MSIE":
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} MSIE
RewriteRule \.(xml|xhtml)$ %{REQUEST_URI} [T=text/html]
does not seem to work for me. (I'm using Apache2 for Windows right now, can't boot into Linux to check it out this moment)
I've also tried REQUEST_FILENAME with no luck.
#2. Is it possible to look at last modified time stamps for a requested file, and if it is say more than a week old, issue a redirect elsewhere? I think I may need to use PHP or something instead, but if I could contain this solely to .htaccess, that would rock. :)
Thanks.