Jump to content

using htaccess to rewrite subdomains, but still keep users or sessions active...


Recommended Posts

So, I'm designing a new site for a customer, and he wants Support (tickets, and chat), and Status (Network Status, and Issues) to be seperated by subdomain, but still allow for the customers to stay logged in, for example:

 

support.domain.com - This subdomain would house support tickets, live chat, and knowledgebase features, but would only be accessible from support.domain.com.

 

network.domain.com - This subdomain would house network issues, announcements, and the server status pages, and would only be accessible from network.domain.com

 

I am able to separate most of this by using simple rewrite rules with htaccess and the tpls inside the smarty system, but for the life of me can't figure out how to allow the session across multiple subdomains, I know the source is encrypted and it is against the ToS to unencrypt it, but I can't find any way to do what the customer is requesting.

 

I hope someone can shed some light on this.

Link to comment
Share on other sites

I realize there are other posts, but I am literally at a stand still with this project until I can get this issue figured out.

 

I know that WHMCS uses sessions and cookies, however I can't find a way to keep the user logged in when navigating to a wildcard whmcs subdomain. Does anyone (anyone at all) have anything I can attempt to do this? Like I previously said, most of the code is encrypted and I don't want to break the rules, but I do need to get this project finished. Please and thank you.

Link to comment
Share on other sites

Also, someone asked me in a private message how i made wildcards work, so i figured i'd post it here. kinda related.

 

{php}$url=$_SERVER['HTTP_HOST'];if (($url=='support.domain.com')) {{/php}

{include file='home-support.tpl'}

{php}} else if (($url=='status.domain.com')) {{/php}

{include file='home-status.tpl'}

{php}} else {{/php}

{include file='home-site.tpl'}

{php}}{/php}

Link to comment
Share on other sites

  • 2 weeks later...
So, I'm designing a new site for a customer, and he wants Support (tickets, and chat), and Status (Network Status, and Issues) to be seperated by subdomain, but still allow for the customers to stay logged in, for example:

 

support.domain.com - This subdomain would house support tickets, live chat, and knowledgebase features, but would only be accessible from support.domain.com.

 

network.domain.com - This subdomain would house network issues, announcements, and the server status pages, and would only be accessible from network.domain.com

 

I am able to separate most of this by using simple rewrite rules with htaccess and the tpls inside the smarty system, but for the life of me can't figure out how to allow the session across multiple subdomains, I know the source is encrypted and it is against the ToS to unencrypt it, but I can't find any way to do what the customer is requesting.

 

I hope someone can shed some light on this.

 

hi

i have the same problem, did you find a way to solve this?

Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated