How can I setup a 302 or 301 redirect from a subdomain to an external site?
-
Alrighty, so I'm running into this issue night now. I'm trying to setup over 9 different redirects to htmls. Basically, sub1.domain.com connects to domain.com/sub1.html for all of them. This being a setup for redirection generator links. Theoretically, I could create a app for every sub domain, or I could just setup sub-directories for it. But, I am importing a project that is live, so I'm going to have to stick with the sub-domain method. Is there a way to bypass the redirection without making tons of apps? I know I could do a rewrite condition, however that only works when the redirect is made on the site through htaccess. But redirecting it through the panel ensures that you never reach the htaccess under the sub domain and if you don't specify the sub-domain, the web-server never responds to it.
-
@toxicdorito I see now, that the LAMP App is missing alias, I'm unsure if that might be the fix, but I think so. All I know is, I can't figure this stuff out
-
@toxicdorito yes the alias features + htaccess rewrite using the LAMP app should solve this for you.
The LAMP app also has
multiDomain
and thus alias support. Can you double check in the Location tab of the app configure screen in your Coudron dashboard? -
@toxicdorito oh actually I see, the alias feature will only be shown with the next release. I was looking at my developer instance which has current master branch version. So then it will be fixed with the next Cloudron version.
-
@girish said in How can I setup a 302 or 301 redirect from a subdomain to an external site?:
I am probably missing something. Support for multi domain/aliases is already in Cloudron 7.
@toxicdorito What is the version of your Cloudron ? The latest lamp package already has support for aliases -
What if we want to create an alias or redirect for our dashboard domain?
I want https://my.ud.coop to redirect to https://my.uniteddiversity.coop, see https://forum.cloudron.io/post/44785