New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
303 response code on wrong URLs instead of 404 response code #8573
Comments
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 requesthas not already been internally rewritten to the index.php scriptRewriteCond %{REQUEST_URI} !^/index.php and the requested path and file doesn't directly match a physical fileRewriteCond %{REQUEST_FILENAME} !-f and the requested path and file doesn't directly match a physical folderRewriteCond %{REQUEST_FILENAME} !-d internally rewrite the request to the index.php scriptRewriteRule .* index.php [L] End - Joomla! core SEF Section.
|
Damn. I'm attaching the file. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8573. |
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8573. |
I can confirm this on current staging This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8573. |
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": Tested on: |
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. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/8573. |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/8573 |
Steps to reproduce the issue
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
Expected result
I must get 404 response code when input wrong URL.
Actual result
Redirect at index.php with 303 response code.
System information (as much as possible)
I tested it with Joomla 3.4.5
Additional comments
It's happen when website is offline and because of these .htaccess rules:
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.
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.
The text was updated successfully, but these errors were encountered: