Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2022-05-16 09:24:16

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: RSS not working

I think you might be on to something there.

Investigating …

Offline

#17 2022-05-16 09:51:46

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: RSS not working

Well, I was indeed missing these lines in my .htaccess in the mod_mime.c module…

AddType application/atom+xml        atom
AddType application/rss+xml            rss
AddType application/xml                  xml

Adding them has not changed anything, though.

Maybe that is the problem at the host’s end.

But just curious, even though it is less efficient to use .htaccess for that, wouldn’t it override anything set in the Apache httpd.conf file?

Last edited by Destry (2022-05-16 09:52:10)

Offline

#18 2022-05-16 12:42:25

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,795
GitHub

Re: RSS not working

Fugly link works, fwiw:

wion.com/index.php?rss=1&section=notes

…which leads me to wonder if it’s a .htaccess rewrite issue.

Offline

#19 2022-05-16 12:57:21

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: RSS not working

Anything look off here? I am not really qualified to see it well.

# ----------------------------------------------------------------------
# D] REWRITES
# ----------------------------------------------------------------------

# D.1] Textpattern CMS

<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /relative/web/path/
	#Options +FollowSymLinks

	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]

	RewriteCond %{REQUEST_URI} !=/favicon.ico
	RewriteRule ^(.*) index.php

	RewriteCond %{HTTP:Authorization}  !^$
	RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]		
</IfModule>

# D.2] Forcing `No WWW`

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
	RewriteRule ^(.*)$ http://%1/$1 [R=301,L]	
</IfModule>

# D.3] Forcing `https://`

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{HTTPS} !=on
	RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

# D.4] Block Access to Hidden Files/Directories

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
    RewriteCond %{SCRIPT_FILENAME} -d [OR]
    RewriteCond %{SCRIPT_FILENAME} -f
    RewriteRule "(^|/)\." - [F]
</IfModule>

Offline

#20 2022-05-16 14:35:04

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,795
GitHub

Re: RSS not working

Destry wrote #333305:

But just curious, even though it is less efficient to use .htaccess for that, wouldn’t it override anything set in the Apache httpd.conf file?

Yes, that’s one of the intended use cases. The web server sets its configs at a low level, and per-site or per-directory adds or changes directives.

Offline

#21 2022-05-16 14:38:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,498
Website GitHub

Re: RSS not working

gaekwad wrote #333313:

Fugly link works

Not for me. I get the RSS XML file downloaded as index.php in Firefox. Might just be my browser settings though.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#22 2022-05-16 15:43:19

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,276
Website Mastodon

Re: RSS not working

on my desktop https://wion.com/rss/?section=notes opens up Apple News app. But no love for your feed.
So your RSS seems to trigger a news reader and i don’t get a file download.


…. texted postive

Offline

#23 2022-05-16 15:50:18

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,276
Website Mastodon

Re: RSS not working

Destry wrote #333302:

Thanks, bic. I’m just aiming for simple, light, privacy-respecting, and quality—whether it’s a throwback, pass forward, or lateral toss.

I see it as a continuum of some very great simple— less is more —website that i have had the pleasure of visiting over the years starting off with textile.com

By this time next year I hope to be hosting and powering it myself from a Blackberry Pi and solar panel. I’m sick of these web host middlemen. I’d like to fold in a small wind turbine later, to help with up-time in the winter season. Part of this means getting the wifman on board with my experiments, though. ;}

let me put in a shameless plug for opalstack.com . you owe it to yourself to give them a test drive. if only for their personal support.

PS managing your own server ? Give that a second thought. Spend more time on your wood working or writing. You will be a much happier camper À bientôt


…. texted postive

Offline

#24 2022-05-16 16:04:52

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,395
Website GitHub Mastodon Twitter

Re: RSS not working

Wild guess. Would it be ♬ appearing on /notes/dark-mode?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#25 2022-05-16 20:37:29

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: RSS not working

gaekwad wrote #333313:

Fugly link works, fwiw:

wion.com/index.php?rss=1&amp;section=notes

That does work for me, too, in Reeder.app. Which makes me realize having it set for excerpts only is a little lacking. I will just put that URL under the link, if that’s the fix.

colak wrote #333329:

Wild guess. Would it be ♬ appearing on /notes/dark-mode?

Gosh, I hope not. A glyph would be a sad thing to trip up a feed with. But I’ll check.

/ a few minutes later /

Glyph wasn’t the problem, but I took it out anyway.

Last edited by Destry (2022-05-16 21:39:32)

Offline

#26 2022-05-17 01:46:55

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,670
Website

Re: RSS not working

gaekwad wrote #333313:

Fugly link works, fwiw:

wion.com/index.php?rss=1&amp;section=notes

…which leads me to wonder if it’s a .htaccess rewrite issue.

Probably, although at first I don’t see any issue with the contents of the .htaccess as posted.

That fuggly link works fine in NNW and Vienna here. Haven’t checked on the iPhone.

As Firefox does not know about feeds anymore, unless you specifically tell it, I should download that file, I think.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#27 2022-05-17 08:52:39

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,912
Website

Re: RSS not working

Bloke wrote #333320:

I get the RSS XML file downloaded as index.php in Firefox.

That’s what I get, too, versus the .rss file downloaded using the feed_link tag’s clean URL.

The difference in this case is the crusty URL actually works in the Reeder.app.

Here is a more complete set of .htaccess contents, if anyone sees anything popping out. I’m sure I could refine it a bit, but I’ve not had the time to look into it.

# ----------------------------------------------------------------------
#   A] CROSS-ORIGIN
# ----------------------------------------------------------------------

# A.1] Cross-Origin Requests

# <IfModule mod_headers.c>
#     Header set Access-Control-Allow-Origin "*"
# </IfModule>

# A.2] Cross-Origin Images

#<IfModule mod_setenvif.c>
#    <IfModule mod_headers.c>
#        <FilesMatch "\.(bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
#            SetEnvIf Origin ":" IS_CORS
#            Header set Access-Control-Allow-Origin "*" env=IS_CORS
#        </FilesMatch>
#    </IfModule>
#</IfModule>

# A.3] Cross-Origin Fonts

<IfModule mod_headers.c>
    <FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
        Header set Access-Control-Allow-Origin "*"
    </FilesMatch>
</IfModule>

# ----------------------------------------------------------------------
# B] ERRORS
# ----------------------------------------------------------------------
# B.1] Custom Error Messages/Pages

# ErrorDocument 404 /404.html
# ErrorDocument 403 default

# ----------------------------------------------------------------------
# C] MEDIA TYPES & CHARACTER ENCODINGS
# ----------------------------------------------------------------------

# C.1] Media Types

<IfModule mod_mime.c>

	# Data interchange

	AddType application/atom+xml						atom
	AddType application/json                json map topojson
	AddType application/ld+json             jsonld
	AddType application/rss+xml            rss
	AddType application/geo+json           	geojson
	AddType application/rdf+xml            rdf
	AddType application/xml                xml

	# Media files

	## This one used by Textpattern, too

	AddType image/svg+xml  								svg svgz

	# Web fonts

	AddType font/woff                      woff
	AddType font/woff2                     woff2
	AddType font/ttf                       ttf
	AddType font/collection                ttc
	AddType font/otf                       otf

	# Other

	AddType text/markdown markdown md		

</IfModule>

# C.2] Character Encodings

AddDefaultCharset utf-8

# C.3]  Type 'charset' to 'UTF-8'

<IfModule mod_mime.c>
	AddCharset utf-8 .appcache \
                     .bbaw \
                     .css \
                     .htc \
                     .ics \
                     .js \
                     .json \
                     .manifest \
                     .map \
                     .markdown \
                     .md \
                     .mjs \
                     .topojson \
                     .vtt \
                     .vcard \
                     .vcf \
                     .webmanifest \
                     .xloc
</IfModule>

# ----------------------------------------------------------------------
# D] REWRITES
# ----------------------------------------------------------------------

# D.1] Textpattern CMS

<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /relative/web/path/
	#Options +FollowSymLinks

	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]

	RewriteCond %{REQUEST_URI} !=/favicon.ico
	RewriteRule ^(.*) index.php

	RewriteCond %{HTTP:Authorization}  !^$
	RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]		
</IfModule>

# D.2] Forcing `No WWW`

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
	RewriteRule ^(.*)$ http://%1/$1 [R=301,L]	
</IfModule>

# D.3] Forcing `https://`
# This needs commented out on local. Uncomment when live!

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{HTTPS} !=on
	RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>

# D.4] Block Access to Hidden Files/Directories

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
    RewriteCond %{SCRIPT_FILENAME} -d [OR]
    RewriteCond %{SCRIPT_FILENAME} -f
    RewriteRule "(^|/)\." - [F]
</IfModule>

# ----------------------------------------------------------------------
# E] SECURITY
# ----------------------------------------------------------------------

# E.1] Clickjacking                                                       |

<IfModule mod_headers.c>
     Header set X-Frame-Options "DENY" "expr=%{CONTENT_TYPE} =~ m#text/html#i"
</IfModule>

# E.2] File Access

#DirectoryIndex index.php index.html

# E.3] Block Access to Directories w/o Default file

<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>

# E.4] Block Access to Files of Sensitive Nature

<IfModule mod_authz_core.c>
    <FilesMatch "(^#.*#|\.(bak|conf|dist|fla|in[ci]|log|orig|psd|sh|sql|sw[op])|~)$">
        Require all denied
    </FilesMatch>
</IfModule>

# E.5] Reducing Mime Type Security Risks

<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
</IfModule>

# E.6] Reflected Cross-Site Scripting (XSS) attacks

<IfModule mod_headers.c>
    Header set X-XSS-Protection "1; mode=block" "expr=%{CONTENT_TYPE} =~ m#text/html#i"
</IfModule>

# E.7] ETags

<IfModule mod_headers.c>
    Header unset ETag
</IfModule>

FileETag None

# E.8] Server-side Technology Information

<IfModule mod_headers.c>
    Header unset X-Powered-By
</IfModule>

# E.9] Server Software Information

ServerSignature Off

# ----------------------------------------------------------------------
# F] WEB PERFORMANCE
# ----------------------------------------------------------------------

<IfModule mod_deflate.c>

  # F.1] Force compression for mangled `Accept-Encoding` request headers.

  <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
      SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
      RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
    </IfModule>
  </IfModule>

  # F.2] Compress all output labeled with one of the following media types.

  <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE "application/atom+xml" \
                                  "application/javascript" \
                                  "application/json" \
                                  "application/ld+json" \
                                  "application/manifest+json" \
                                  "application/rdf+xml" \
                                  "application/rss+xml" \
                                  "application/schema+json" \
                                  "application/geo+json" \
                                  "application/vnd.ms-fontobject" \
                                  "application/wasm" \
                                  "application/x-font-ttf" \
                                  "application/x-javascript" \
                                  "application/x-web-app-manifest+json" \
                                  "application/xhtml+xml" \
                                  "application/xml" \
                                  "font/eot" \
                                  "font/opentype" \
                                  "font/otf" \
                                  "image/bmp" \
                                  "image/svg+xml" \
                                  "image/vnd.microsoft.icon" \
                                  "text/cache-manifest" \
                                  "text/calendar" \
                                  "text/css" \
                                  "text/html" \
                                  "text/javascript" \
                                  "text/plain" \
                                  "text/markdown" \
                                  "text/vcard" \
                                  "text/vnd.rim.location.xloc" \
                                  "text/vtt" \
                                  "text/x-component" \
                                  "text/x-cross-domain-policy" \
                                  "text/xml"

  </IfModule>

  # F.3] Force Apache to serve file types w/ appropriate `Content-Encoding` response header.

  <IfModule mod_mime.c>
		 AddEncoding gzip       svgz
  </IfModule>

</IfModule>

There’s also a large section at the end for robot blocking, but I don’t think that has any effect here, and it’s long, in any case, so I’ll not pollute the space here.

Offline

#28 2022-05-17 16:18:09

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,276
Website Mastodon

Re: RSS not working

As News App seems to hi-jack xml RSS files and then do nothing with them i have reached out to Apple Support to see what they have to say.


…. texted postive

Offline

#29 2022-05-17 22:26:51

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,276
Website Mastodon

Re: RSS not working

so i setup NetNewsWire as my default Reader. ploped in https://wion.com/index.php?rss=1&section=notes

and it read all the posts. … and all is golden in Wion Land.

new

_PS this textile does not work _


…. texted postive

Offline

#30 2022-05-18 00:26:33

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,670
Website

Re: RSS not working

bici wrote #333360:

so i setup NetNewsWire as my default Reader. […]

curious: how does one set NNW as default RSS reader, it does not seem to offer any preference for doing that (like any other browser or RSS reader does).

_PS this textile does not work _

That seems a known issue with images


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

Board footer

Powered by FluxBB