skip to Main Content

because of some alterings in the page structure many of our pages changed the pid. It does not matter in SEO terms because of speaking urls but there are a bunch of third party links with wrong pids, e. g.:

https://www.myDomain.de/index.php?id=46&no_cache=1&sword_list[0]=someWord

The page with uid 46 exists but is not the meant one, and it now resides under a different domain. So the result is the following exception:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1518472189: 
ID was outside the domain | TYPO3CMSCoreErrorHttpPageNotFoundException 
thrown in file typo3/sysext/frontend/Classes/Controller/ErrorController.php 
in line 80. Requested URL: 
https://www.myDomain.de/index.php?id=46&no_cache=1&sword_list[0]=someWord

My question:

Can i tell TYPO3 not to throw an exception but to treat all Outside Domain Events simply as 404 with a redirect to the error page?

thanks!

2

Answers


  1. Should be possible by ading an 404 error handling in Site Management module:
    Site Management -> Sites -> Yoursite -> Tab "Error hanling" -> Create new

    Login or Signup to reply.
  2. Showing your 404-page with the correct status code in that case is in my experience unfortunately not too obvious.

    The simplest for ?id=... with deleted/moved pages (which because of that do not map to the correct site) is to do redirects to useful pages with EXT:redirect or on the webserver level.

    That’s an example with EXT:redirect:

    EXT:redirect

    If there’s nothing comparable in the new content that you could redirect to, you can show your 404-page, e.g. by a passthrough ([PT] with Apache mod_rewrite https://httpd.apache.org/docs/2.4/mod/mod_rewrite.html). You should make sure to send a 404 status in that case. (E.g. through .htaccess, a userFunc on the 404-page, …).

    I hope somebody else has a simpler idea.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search