Joomla was generating a Category Blog layout for Uncategorised articles even though an explicit menu item was not created to do so.
With SEF URLs enabled, the URL always ended with “2-categorised”. For example:
https://mysite.com/a/2-categorised
https://mysite.com/b/2-categorised
No matter the subdirectory, it would display uncategorised articles in its default Category Blog layout — with 1 leading article, 4 intro articles in 2 columns, and 4 links at the bottom.
To “fix” this, I created a redirect to my 404 page, but you could redirect the user to whatever page you want.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Apache | |
RewriteCond %{QUERY_STRING} ^$ | |
RewriteRule (^|/)2-uncategorised$ /404 [R=301,L] | |
// IIS | |
<rule name="Joomla! Uncategorised Rule" stopProcessing="true"> | |
<match url="^(.*)$" ignoreCase="false" /> | |
<conditions logicalGrouping="MatchAny"> | |
<add input="{URL}" pattern="(^|/)2-uncategorised$" ignoreCase="false" /> | |
</conditions> | |
<action type="Redirect" url="/404" redirectType="Permanent" /> | |
</rule> |