Hi Habitual,
(all the URLs I present are just samples - not of my actual website, since I don't wish to present myself additional security issues)
I hadn't adjusted my .htaccess file to be seen from an SELinux standpoint and I had it enforcing... So, I changed it this afternoon. Mind you nothing changed since then (in spite of changing the Permalinks a couple of times back and forth after).
I read a couple of things on the net:
1. One individual reports that he couldn't get permalinks working until he removed everything else from his .htaccess file. I have WPFastestCache - which requires several lines of it's own in there.
2. A second individual writes of his situation that he couldn't get it working, because he had multiple installations of WordPress - as soon as he made the second install, his first one stopped working - ie the .htaccess stopped being updated.
I have two web URLs managed by wordpress. One is
http://mywebsite.ca/ and the other is
http://mywebsite.ca/videos/
My .htaccess remains the same regardless of what changes I make to permalinks. But, switching between the default URL (
http://mywebsite.ca/?page_id=273, and
http://mywebsite.ca/existent-page/) both work, except for the pages that are inexistent. Again, in the first case, I simply get my website homepage when I enter
http://mywebsite.ca/inexistent/ (without the URL changing in the web browser) and in the second case, when I enter
http://mywebsite.ca/inexistent/, I get the top menu bar, a side menu bar and a "404 Not Found" tab title.
I tested the .htaccess using diff between changes and there is no difference - even though I get a report from wordpress that "Permalink structure updated."
Here is the wordpress .htaccess file lines:
<<<<=================== BEGIN CONTENT =============>>>>
# BEGIN WpFastestCache
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^
www.mywebsite.ca [NC]
RewriteRule ^(.*)$ http\:\/\/mywebsite\.ca\/$1 [R=301,L]
# Start WPFC Exclude
# End WPFC Exclude
# Start_WPFC_Exclude_Admin_Cookie
RewriteCond %{HTTP:Cookie} !wordpress_logged_in_[^\=]+\=P_6thSense
# End_WPFC_Exclude_Admin_Cookie
RewriteCond %{HTTP_HOST} ^mywebsite.ca
RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit|LinkedInBot|WhatsApp|Mediatoolkitbot)
RewriteCond %{HTTP_USER_AGENT} !(WP\sFastest\sCache\sPreload(\siPhone\sMobile)?\s*Bot)
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !(\/){2}$
RewriteCond %{REQUEST_URI} \/$
RewriteCond %{QUERY_STRING} !.+
RewriteCond %{HTTP:Cookie} !comment_author_
RewriteCond %{HTTP:Cookie} !woocommerce_items_in_cart
RewriteCond %{HTTP:Cookie} !safirmobilswitcher=mobil
RewriteCond %{HTTP:Profile} !^[a-z0-9"]+ [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f [or]
RewriteCond /var/www/html/wp-content/cache/all/$1/index.html -f
RewriteRule ^(.*) "/wp-content/cache/all/$1/index.html" [L]
</IfModule>
<FilesMatch "index\.(html|htm)$">
AddDefaultCharset UTF-8
<ifModule mod_headers.c>
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Mon, 29 Oct 1923 20:30:00 GMT"
</ifModule>
</FilesMatch>
# END WpFastestCache
# BEGIN LBCWpFastestCache
<FilesMatch "\.(webm|ogg|mp4|ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)(\.gz)?$">
<IfModule mod_expires.c>
AddType application/font-woff2 .woff2
ExpiresActive On
ExpiresDefault A0
ExpiresByType video/webm A2592000
ExpiresByType video/ogg A2592000
ExpiresByType video/mp4 A2592000
ExpiresByType image/webp A2592000
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/ico A2592000
ExpiresByType image/svg+xml A2592000
ExpiresByType text/css A2592000
ExpiresByType text/javascript A2592000
ExpiresByType application/javascript A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType application/font-woff2 A2592000
</IfModule>
<IfModule mod_headers.c>
Header set Expires "max-age=2592000, public"
Header unset ETag
Header set Connection keep-alive
FileETag None
</IfModule>
</FilesMatch>
# END LBCWpFastestCache
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
<<<<=================== END CONTENT =============>>>>