Reputation: 71
i need help at redirecting the user to the login page if he wants to access a restricted page.
At first i will explain how the tree root looks like. There are multiple domains for that Typo3 instance. Every domain got its own part in the tree with its own typoscript. There is one template domain that has a template for all other domains and also some content for all other domains.
Root (0)
+- Template-Domain (3)
+- Pagetree-Group-A (13, access restricted, standard)
+- Content-A-1 (103, standard)
+- Content-A-2 (113, standard)
+- Pagetree-Group-B (23, access restricted, standard)
+- Content-B-1 (163, standard)
+- Content-B-2 (173, standard)
+- Other-Pages (33, standard)
+- Domain-A (523)
+- Pagetree-Group-A (533, access restricted, standard)
+- Content-A-1 (583, standard)
+- Content-A-2 (593, standard)
+- Pagetree-Group-B (543, access restricted, mountpoint->23)
+- Other-Pages (553, standard) |
+- Domain-B (1643)
+- Pagetree-Group-A (1653, access restricted, standard)
+- Content-A-1 (1693, standard)
+- Content-A-2 (1703, standard)
+- Pagetree-Group-B (1663, access restricted, mountpoint->23)
+- Other-Pages (1673, standard)
+- Domain-C (3693)
+- Pagetree-Group-A (3703, access restricted, standard)
+- Content-A-1 (3753, standard)
+- Content-A-2 (3763, standard)
+- Pagetree-Group-B (3713, access restricted, mountpoint->23)
+- Other-Pages (3723, standard)
When a not logged in user now wants to access Content-A-X from Domain-X, he gets the content (login-form) from the Domain-X page due to Typo3's behavior.
But if he wants to access a Content-B-X page from Domain-X, Typo3 throws the error
=======================
The requested page didn't have a proper connection to the tree-root! <br /><br />(MP value remain!)
=======================
I want to redirect the user to the Domain-X Page with the login-form. But using config.additionalHeaders = Location: /...
doesn't change anything. I think its because the error is thrown before the TypoScript is executed.
Is there a possibility to not get an error on this behavior?
Upvotes: 2
Views: 927
Reputation: 439
I dont know exactly what you are trying to do but I often have problem sharing content over root points in TYPO3.
These settings are essential for typolinks and content sharing across domains..
Do you have these settings in your config?
# Links & content sharing across domains
config.typolinkEnableLinksAcrossDomains = 1
config.typolinkCheckRootline = 1
config.content_from_pid_allowOutsideDomain = 1
config.MP_mapRootPoints = 1, 2, 3 [your root points]
Upvotes: 1