This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

jvdwesthuizen
jvdwesthuizen

Hi,

I'm fairly new to OctoberCMS and would like to get more details, please see below:

I would like to redirect admin.domain.com to the backend of OctoberCMS (backend/backend/auth/signin) if possible.

Can I do that with a plugin or in the code.

Thanks.

mjauvin
mjauvin

I suggest using a Rewrite rule in .htaccess to do this.

jvdwesthuizen
mjauvin
mjauvin

Try this at the start of the .htaccess file:

    RewriteCond %{HTTP_HOST} ^admin.domain.com$
    RewriteRule ^ https://domain.com/backend/ [L]

*Note that the rule is applied only if domain = admin.domain.com (which should only be used to redirect to the backend area of the main domain)

jvdwesthuizen
jvdwesthuizen

Hi,

Thanks for the reply and details.

I've tried that but changed the "admin.domain.com" to something else, just to test but not working.

This is what I tried : (I will delete / change this below once I get a reply)

RewriteCond %{HTTP_HOST} ^engen-staging-admin.engen.co.za$
RewriteRule ^ https://engen-staging-admin.engen.co.za/backend/ [L]

Please let me know.

Thanks.

Last updated

mjauvin
mjauvin

You need two seperate domains in order for this to work, as mentioned in my Note above...

Last updated

jvdwesthuizen
jvdwesthuizen

But why, please explain as I don't understand why?

1-7 of 7

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.