RewriteCond %{REQUEST_URI} ^/(Essays|essays)/.*\.shtml$
RewriteRule (Essays/foo.html) /index.php?option=com_content&view=article&id=32&Itemid=113&archive=$1 [L]
It is expected that the URL would result in the same page and to be correctly processed by the component for the 'essays' menu item whether using J3 or J4.
This works fine in Joomla 3, but not in Joomla 4 which creates a 404 error
If one uses the lowercase version, it works OK
It appears that the Joomla 3 router parse rules (SiteRouter.php / function parseSefRoute() use strtolower on the uri path before making comparisons with the available menu item aliases. However the Joomla 4 equivalent does not.
For example in Joomla 3 the relevant search for matching menu items is made with the test:
if ($item->route === $route_lowercase)
where $route_lowercase
has been created using strtolower()
in Joomla 4 the corresponding test is
if ( $item->alias == $segment ... )
without the $segment
having been forced to lowercase.
This is an issue backward compatibility in a number of cases. If faced with this issue the user appears to have only the alternative of forcing a redirect for URL's that contain upper case (redirect versus internal rewrite) and in so doing may lose pagerank for valuable pages
Labels |
Added:
No Code Attached Yet
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-12-11 12:18:11 |
Closed_By | ⇒ | Fedik |
Is it a duplicate report to #38257 ?