Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to route subdomain to its own domain #514

Closed
mazharoddin opened this issue Oct 13, 2016 · 9 comments
Closed

How to route subdomain to its own domain #514

mazharoddin opened this issue Oct 13, 2016 · 9 comments

Comments

@mazharoddin
Copy link
Contributor

I am facing some issue while routing subdomain to its own domain, I updated the CNAME, but still if I access subdomain domain name, its taking to root domain name instead of subdomain domain name.
e.g.
I have a subdomain at blog.example.com, now I wanted to route blog.example.com to http:// blog.com, so I updated CNAME of blog.com as below.

www     CNAME   blog.example.com    NA  3603*   3rd-party

but now if I access blog.example.com, I re-routed to http:// example.com instead of http:// blog.com.
Please let me know how to resolve this. Looks like some setting I am missing.

@mazharoddin mazharoddin changed the title How to point subdomain to its own domain How to route subdomain to its own domain Oct 13, 2016
@owen2345
Copy link
Owner

@mazharoddin
Please change the slug (domain) of your site in the DB, table name "cama_taxonomies".

@mazharoddin
Copy link
Contributor Author

Thanks @owen2345 ..I will try it..

@mazharoddin
Copy link
Contributor Author

Hi @owen2345,
I tried to change the slug as below, but still its not working.

=> UPDATE cama_term_taxonomy SET slug = 'demo.com' WHERE slug = 'demo';
UPDATE 1

I have a subdomain called demo.example.com and I updated CNMAE to route it to http://demo.com ..also updated db table as you suggested, but still if I access http://demo.example.com its routing to http://example.com instead of http://demo.com

@owen2345
Copy link
Owner

Please in your console enter this:

Cama::Site.all.pluck(:slug)

and let me know the results.

@mazharoddin
Copy link
Contributor Author

Hi @owen2345,
Here is the o/p.

irb(main):001:0> Cama::Site.all.pluck(:slug)
   (0.8ms)  SELECT "cama_term_taxonomy"."slug" FROM "cama_term_taxonomy" WHERE "cama_term_taxonomy"."taxonomy" = $1 ORDER BY "cama_term_taxonomy"."term_group" DESC  [["taxonomy", :site]]
=> ["kisanly", "shopick", "shopper.com", "mazhar", "help", "demo.com", "indadent",  "aijaz"]

I wanted to route http://shopick.shopper.com to http://shopick.com. Thanks.

@owen2345
Copy link
Owner

Please change "shopick" into "shopick.com" because without the extension it is working as a subdomain.

@mazharoddin
Copy link
Contributor Author

mazharoddin commented Oct 20, 2016

Yes, I changed as you mentioned, but still its routing to main domain(shopper.com) if I try to access http://shopick.com, one more issue I observed after this change, now even http://shopick.shopper.com routing to http://shopper.com.

@owen2345
Copy link
Owner

mmmm Please contact me on Skype to review more.
It is strange!

@mazharoddin
Copy link
Contributor Author

Sure @owen2345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants