1
votes

We're running TYPO3 9.5 with correctly set up Site Configuration. The main domain has multiple subdomains which have their own Site Configuration.

domain.com
sub1.domain.com
sub2.domain.com
sub3.domain.com

All these urls point to a different Site Configuration, which works fine. But when a user types sup1.domain.com instead of sub1.domain.com, "No TypoScript template found!" is shown. Within the Site Configuration "Error Handling", "Show content from page" is set up for error 503.

The configured error page is not showing, but the default "No TypoScript template found!". How could we show an actual TYPO3 page when a subdomain is entered wrong?

The 404 page works fine, but only with segments after the actual domain, eg. sub1.domain.com/does-not-exist shows the 404 page, as configured.

1
Does each subdomain has an own page entry? If yes, double check TS Template pleaseAMartinNo1
@AMartinNo1 Double check for what exactly?Andreas
Maybe, it would be a better solution to redirect all non-existing domains via .htaccess to an existing one.Julian Hofmann
@JulianHofmann What? How could I possibly know when a visitor types the url wrong?Andreas
Sorry, my comment was none-sense. Did not got in the first place that you want to handle invalid subdomains. Thought subdomain is invalid due to missing TS Template. My Bad.AMartinNo1

1 Answers

0
votes

As already noted by Julian Hofman you should redirect all 'non-existend' subdomains to your main (sub) domain. Sure, in this situation you cannot handle typos, but this solution is very fast and error-safe. TYPO3 can only handle "known" (sub)domains.

Redirecting all unknown subdomains can be done via .htaccess (on Apache) or your domain hosting admin-panel .

HTH Henrik