View Single Post
Old 06-30-2002, 04:49 AM   PM User | #1
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
.htaccess Rewrite questions

I have two of them :

#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.
__________________
jasonkarldavis.com
jkd is offline   Reply With Quote