I’m quite puzzled about what’s going on. I changed it to this:
# BEGIN WordPress
AddType application/rss+xml xml
<FilesMatch "\.xml$">
ForceType application/rss+xml
</FilesMatch>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.sqldownunder.com [NC]
RewriteRule ^(.*)$ http://sqldownunder.com/$1 [L,R=301,NC]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
And if I access http://www.sqldownunder.com/SQLDownUnderMP3Feed.xml it
still comes back as text/html.
Regards,
Greg
Dr Greg Low
1300SQLSQL (1300 775 775) office | +61 419201410 mobile│ +61 3 8676 4913 fax
SQL Down Under | Web: www.sqldownunder.com |http://greglow.me
*From:* [email protected] [mailto:[email protected]]
*On Behalf Of *Greg Wood
*Sent:* Sunday, 10 December 2017 4:31 PM
*To:* ozDotNet <[email protected]>
*Subject:* Re: Apache and WordPress redirects and mime types - trying to
fix SQLDownUnder podcast feed
Hi Greg,
This rings bells for me about the order it applies the rules and
subsequently stops processing the remainder of the rules.
There is another way you could do this. It is to put a explicit rule for
your xml file before anything else and then do a FilesMatch .xml then do a
ForceType to rss+xml
Have a search on those two terms and you might find some examples
Greg
Greg Wood
e: [email protected]
t: +61417044439
On 10 December 2017 at 11:24, Greg Low <[email protected]> wrote:
Hi Brains Trust,
Hoping someone on the list knows about this stuff.
I've moved our old site at www.sqldownunder.com to a WordPress site at
sqldownunder.com (long story). Most things are ok now. I added a DNS HTML
redirect from www to http://sqldownunder.com and that seems to get people
there.
One issue though is our RSS feed. It was
http://www.sqldownunder.com/SQLDownUnderMP3Feed.xml.
I set up a mime type mapping from xml to application/rss+xml in the
.htaccesss file and if I access it via
http://sqldownunder.com/SQLDownUnderMP3Feed.xml it works fine. If, however,
I access it via http://www.sqldownunder.com/SQLDownUnderMP3Feed.xml, it's
returned with the mime type text/html and fails. I've got the following in
the .htaccess file:
# BEGIN WordPress
AddType application/rss+xml xml
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.sqldownunder.com [NC]
RewriteRule ^(.*)$ http://sqldownunder.com/$1 [L,R=301,NC]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Anyone have any clues on this?
Regards,
Greg
Dr Greg Low
1300SQLSQL (1300 775 775) office | +61 419201410 <+61%20419%20201%20410>
mobile│ +61 3 8676 4913 <+61%203%208676%204913> fax
SQL Down Under | Web: www.sqldownunder.com |http://greglow.me