Forum Moderators: phranque
I also want to exclude two folders on my old-domain.com domain from redirecting... /administrator and /keyclub
I have a current functioning .htaccess as follows below
Options +FollowSymLinks
RewriteEngine on
# Exclude /information directory from redirect
RewriteCond %{REQUEST_URI} !^/administrator
RewriteCond %{REQUEST_URI} !^/keyclub
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
However, if you type in www.old-domain.com from a IE 6.0 or earlier browser, you get an error that says "The XML page cannot be displayed. Cannot view XML input using style sheet." The redirect works, however, in IE 7.0.
How do I fix this?
Thanks in advance.
[edited by: jdMorgan at 11:53 pm (utc) on Nov. 9, 2007]
[edit reason] examplified URLs per TOS. [/edit]
The "Live HTTP Headers" add-on for Firefox and Mozilla-based browsers is a good tool for this kind of work. Alternatively, you can use an on-line server headers checker, but beware that some of them either don't display all headers, or omit intermediate redirects, or both.
The AddType directive is used to associate MIME-types (Content-types) with filetypes on Apache.
Jim
http://www.old-domain.com/
GET / HTTP/1.1
Host: www.old-domain.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: jcalpro1_hidden_display=recurrence; stalyticsCookie=recurrent_count_%23%3A%23_1;
HTTP/1.x 301 Moved Permanently
Date: Sat, 10 Nov 2007 00:25:05 GMT
Server: Apache
Location: http://www.example.com/
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
----------------------------------------------------------
http://www.example.com/
GET / HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: __utmz=205304619.1190502384.119.14.utmccn=(referral)¦utmcsr=us.mg1.mail.yahoo.com¦utmcct=/dc/blank.html¦utmcmd=referral;
HTTP/1.x 200 OK
Date: Sat, 10 Nov 2007 00:25:06 GMT
Server: Apache
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Pragma: no-cache
Set-Cookie: 58416a8cdac7e461afac09036d684392=-; path=/
Set-Cookie: mosvisitor=1
Last-Modified: Sat, 10 Nov 2007 00:25:07 GMT
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
[edited by: jdMorgan at 3:04 am (utc) on Nov. 10, 2007]
[edit reason] obscured URLs and other info [/edit]