Open Jimmi08 opened 6 years ago
Funny, next default installation on the same server, it displays e107 error page. If I set Redirect to System not found page ON, I got browser 404 error.
@lonalore any thoughts?
Adding here too:
Could somebody explain me this: google has indexed this url website/?cat.30 - you got message that page listing is turned off, otherwise book/chapter tree is listed. "page" is defined as root namespace.
Why this page doesn't end with 404? This category never existed, last ID is 25...
@lonalore will be able to explain. There is another issue I found related to this. If a form includes an image tag pointing to a URL (bla.jpg) and that image is not found, it will now return a 404 error page, and reset the form token. When the form is submitted, the user will get an "Unauthorized Access" message.
I believe we need to limit these error page messages to .php files. @SimSync Thoughts?
With news not existing pages are marked like "soft 404" from google
@Jimmi08 I think i found the issue why the redirect didn't work. Please test, once the PR is merged. Thanks!
I think this should stay open. I didn't get an answer to how 404 works.
I try again to explain what I am asking.
url_error_redirect is FALSE
if there is a wrong URL (standalone page, f.e. some mistypo) f.e. contact2.php - URL is not changed and the error page template is displayed.
in the same case but with url_main_module = page, this code is executed: function processViewPage() if(!$sql->gen($query)) { ... header("HTTP/1.0 404 Not Found"); ... } (Invalid page, Requested page does not exist)
with /news/ there is only message Error 404 - Document Not Found and other news are displayed.
url_error_redirect is TRUE
result is redirection ?route=system/error/404&type=routeError
no change, no redirection, (Invalid page, Requested page does not exist)
no redirection
What I am trying to do? With plugin and e_module to log all 404 urls. Now I am just trying to understand how this works in e107. Thanks
I thought this:
If I set Redirect to System not found page ON, it will go to file error.php and display content of this page.
But it doesn't work this way. Any 404 displays browser HTTP ERROR 404.
But if I set Associate Root namespace to Page - it will go to page.php and method processViewPage() will display page with this content.
define("LAN_PAGE_12", "Invalid page");
define("LAN_PAGE_3", "Requested page does not exist");
I use default e107 htaccess. There is this:
I tried to use absolute path there and nothing.
How this should work?