I'm trying to set up a redirect for a prod environment so that when a user navigates to the prod domain, they automatically get directed to our application.
So for example, if you enter a URL for a dev request domain <xxxx-dev.outsystemsenterpise.com>, , the 'out of the box' behaviour is that you automatically get redirected into ServiceCenter:
<xxxx-dev.outsystemsenterpise.com/ServiceCenter>.
I want to specify this type of behaviour for the production environment.
I'm looking to specify one of our applications as the default site for prod. I've set up a site rule with the base URL as the prod request domain and a root application (a traditional webapp, I realise that reactive webapps are not supported yet) but when I browse to the prod request domain, the site rule is directing me to the root application. I just get a blank page.
Bit scared that I don't want to block tool access (service centre, lifetime etc) by setting up a rule at the base url level.
Any advice on how to do this level of redirect would be most welcome. Thanks
Hi Ian,
some functions are available for URL,
https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs/HTTPRequestHandler_API?_gl=1*e3z99o*_ga*MTc5NDQ4MDk4OS4xNjE3Mzc2MjU1*_ga_ZD4DTMHWR2*MTYyMDkxMTYxMS42Mi4xLjE2MjA5MTE3ODMuMTc.#GetRequestDomain
Hope it will be helpful for you
Hi Shradha, thanks for the response. I'd actually already set a traditional web app, and used the GetRequestDomain to work out a redirect URL.
The issue was that the SEO redirect rules don't work, but now we've fixed the issue of the rule not working, so posting the answer.
OK, humble pie time. I had prefixed the base URL with https://. Just using the request domain without the https prefix fixed the issue. In my case I created a simple redirect traditional webapp to then redirect to our reactive webapp. Forthcoming release 11.12 enables this feature directly for reactive webapps so this will be simpler in the future.
Great, thanks for sharing the solution!!
You need to define in SEOs the correct application that will be loaded when you type the root
So Base URL: <xxxx-dev.outsystemsenterpise.com> Root application: you select the application that needs to be loaded instead of default "Service Center"
In my case I redirect to the Theme eSpace that has the Login page.
I see it's been a while since you've posted, but I'm wondering if anyone found a good workaround for setting a default app per domain when using SEO-friendly URLs. I'm dealing with something similar and thinking about using a reverse proxy setup or maybe handling redirects manually. Curious if anyone tried that or found a smoother way with recent OutSystems updates.
Hello Jack,I believe a way has been provided here to do what you want for both Traditional Web and Reactive Web applications, using Site Rules.This doesn't work for you in some way?
I had the same issue and ended up tweaking the SEO URL setup manually in the service center and adjusting the Base URL per module. I also found rankyak.com helpful for checking how things like canonical tags and indexability were affected by different configurations, it gave me quick feedback without having to jump through logs or browser tools.