Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

mod rewrite question

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Basic Newbie CommonName Questions.  
Author Message
user2395

External


Since: Jul 27, 2003
Posts: 7



(Msg. 1) Posted: Tue Jul 29, 2003 9:23 pm
Post subject: mod rewrite question
Archived from groups: alt>apache>configuration (more info?)

I'm hoping I can get an answer to one of the 4 questions I've posted to this
group over the last couple of months, so here goes.

I'm serving XHTML files as application/xhtml+xml as they should be. But IE
doesn't like this. What I wanted to do was use mod_rewrite to change the MIME
type to text/html for IE. I thought I could check for .html at the end of the
request and then use $1 to put the filename back in. No luck though. If
anyone has any thoughts, or a different method of doing this, it would be
appreciated!

Here is httpd_conf

RewriteCond %{HTTP_USER_AGENT} \bMSIE
RewriteRule .*\.html$ $1\.html [T=text/html]


And here are the relevant bits of rewrite_log

init rewrite engine with requested uri /cv/index.html
applying pattern '.*\.html$' to uri '/cv/index.html'
RewriteCond: input='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)'
pattern='\bMSIE' => matched
rewrite /cv/index.html -> .html
remember .html to have MIME-type 'text/html'
local path result: .html
init rewrite engine with requested uri /cv/index.html.var
applying pattern '.*\.html$' to uri '/cv/index.html.var'
pass through /cv/index.html.var

----
Michael Newton
http://mike.rancidcrab.com

 >> Stay informed about: mod rewrite question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Rewrite to another Port - Hi, can somebody tell me how to make a ReWrite Rule for changing port ? Example: User calls sub.domain.com and rewrite should go to sub.domain.com:82 ? Thanks for your help. Bye, Fabian

ReWrite Rules - Hi, Currently my homepage is http://www.indigoclothing.com/index.shtml However I would now want my homeapge to be: http://www.indigoclothing.com/cgi-bin/page.cgi?d=1&page=homepage The dynamic page is different from the static one as the featured...

virtualhost/rewrite help needed - Hi I have a (probably simple) vh (and maybe rewrite?) problem - the rule is simple at least and should work IMO - it's strange to me why it doesn't. This is what i do: NameVirtualHost 217.160.75.67 ### ...several vh... <VirtualHost openspirit.d...

rewrite url to hide GET values - Hello, I would rewrite url to handle a problem I have with dynamic media files. I use a php script to retrieve media files (quicktime, real video ....) from non public directories. I access the file via media.php?m=dataxxx. It works but the..

"Method Not Allowed" when attempting to GET an exe file w/.. - Can you help me, please? Configuration : Server version: Apache/1.3.20 (Unix) System = SunOS Release = 5.8 httpd.conf contains : LoadModule rewrite_module libexec/mod_rewrite.so LoadModule proxy_module libexec/libproxy.so .... RewriteCond..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]