mattrogowski
Well-known member
Hi,
We have a query that's arisen from a client request and would like to check if what we'd be looking to do will work. We essentially need XF to power the homepage of a site, above the directory in which XF is hosted.
The setup is that XF is installed in a folder called
The old vB site had a standalone PHP file in the domain web root which was modified to boot vB and work as a homepage/portal. This would work on vB as it was just flat files, but won't work with XF and a single entry point with an internal router.
What the client has suggested is using Nginx rewrite rules to proxy requests through to different internal URLs, example config below:
As far as we understand, this will cause issues with XF's URL builder, as it's having a different URL passed through to what you're actually on in the browser, and might for example link you to
So, the question is, will this sort of URL proxying work with XF's router and URL builder, or is it likely that incorrect URLs will be generated?
We have a query that's arisen from a client request and would like to check if what we'd be looking to do will work. We essentially need XF to power the homepage of a site, above the directory in which XF is hosted.
The setup is that XF is installed in a folder called
/forums
on the server, which is where their old vB forum was situated. We need to keep it here so redirects will work, and /forums
is an internal XF route.The old vB site had a standalone PHP file in the domain web root which was modified to boot vB and work as a homepage/portal. This would work on vB as it was just flat files, but won't work with XF and a single entry point with an internal router.
What the client has suggested is using Nginx rewrite rules to proxy requests through to different internal URLs, example config below:
NGINX:
location = / {
proxy_pass_request_headers on;
proxy_pass https://domain.com/forums/index.php;
}
location = /forums/ {
proxy_pass_request_headers on;
proxy_pass https://domain.com/forums/index.php?forums/-/list;
}
As far as we understand, this will cause issues with XF's URL builder, as it's having a different URL passed through to what you're actually on in the browser, and might for example link you to
/forums/-/list
instead of /forums
as that's what's being passed through. We don't want to go ahead with it and then find out it won't work as intended and we have no viable homepage.So, the question is, will this sort of URL proxying work with XF's router and URL builder, or is it likely that incorrect URLs will be generated?
Last edited: