I've tested new version of website had to make website offline and work on its SEO and to validate URLs in content. I turned website offline in global configuration, then log in a front-end under super administrator's credentials and tried to enter any wrong URL.
Correct url: /about-us.html
Incorrect url that I'm trying to enter: /about-us222abcd.html
I must get 404 response code when input wrong URL.
Redirect at index.php with 303 response code.
I tested it with Joomla 3.4.5
It's happen when website is offline and because of these .htaccess rules:
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
Please take a look this issue happens when website is offline and you're logged in as user with enough permissions (administrator and above) at front-end side. URLs should work correct in offline too.
Damn.
I'm attaching the file.
Status | New | ⇒ | Confirmed |
I can confirm this on current staging
The code in the error handler does a redirect on a 404 condition and the site is in offline mode. It doesn't account for additional things like whether the user is authenticated. So if someone wants to fix this, that's the type of check that's needed, otherwise it's expected behavior.
See no Difference between "Site offline" or "Site online": index.php/menuname/artikelname-not-existing
redirect on index.php/menuname
.
Tested on:
Joomla! 3.7.0-beta1
macOS Sierra, 10.12.3
Firefox 50.1.0
PHP 7.0.4
MySQLi 5.5.53-0
Status | Confirmed | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-11-08 13:38:42 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Status | Closed | ⇒ | Confirmed |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/8573
closed due the lack of Response. It can always reopened if needed.
Status | Confirmed | ⇒ | Closed |
Closed_Date | 2017-11-08 13:38:42 | ⇒ | 2017-11-08 13:38:53 |
Closed_By | joomla-cms-bot | ⇒ | franz-wohlkoenig |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/8573
Oh, the .htaccess code was stripped in the message above.
Here is it:
Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
If the requested path and file is not /index.php and the request
has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index.php
and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
End - Joomla! core SEF Section.
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8573.