I currently have a lot to do with Typo3 (10.3) and am generally quite good at it. But there is a challenge that makes me despair.
Maybe it is simple for one or the other but I think I'm on the tube. It is roughly about having an intranet exposed to the outside world. (an LDAP query will come later)
I have the following URL internally (intranet.unternehmen.de).
Now everything works fine on the internal side, and there is a reverse proxy entry to the outside app.unternehemen.de/intranet delivers this page.
The problem now is that the page is displayed, but all references / images / CSS are not there because the folder / intranet / is still missing in the URL. (If this folder is manually attached to a URL of an image or PDF, it works wonderfully.
There must be a way to add this folder as soon as the host e.g. app.unternehmen.de is?
I have already made various attempts to solve this using .htaccess, but these rules are not satisfactory.
e.g.
RewriteEngine On
#RewriteCond% {HTTP_HOST} "^ app.unternehmen.de $" [NC, OR]
RewriteCond% {HTTP_HOST} "^ app.unternehmen.de $" [NC] RewriteRule "^ / intranet /(.*)$" "http://app.unternehmen.de/intranet/" [R = 301, L]
or in TypoScript (if someone has an idea)
[globalString = IENV: HTTP_HOST = app.unternehmen.de]
cURL = app.unternehmen.de/intranet/
[END]
Okay there is an solution.
In Version 10 there are new selectors. Following snipped works.
[!ip("192.168.*")]
config {
absRefPrefix = /intranet/
}
[END]