Access subdomain session from main domain

Rejoanul Alam

I have an application in mydomain.com. I want user will be redirected to example.mydomain.com when login to mydomain.com, however session successfully generating in a directory at example.mydomain.com. Now my problem is after submit login, users are not able to login example.mydomain.com. Although there are session files are available.

Session driver is file (mydoman.com config file)

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 0;
$config['sess_save_path'] = 'mydir/application/session_data';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 0;
$config['sess_regenerate_destroy'] = FALSE;

My application working fine in local server. But not working in production.

Saty

You also have to set the cookie_domain and cookie prefix in your config file like this

$config['cookie_prefix'] = "mydomain_";
$config['cookie_domain'] = ".mydomain.com";
$config['cookie_path'] = "/";
$config['cookie_secure'] = FALSE;

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

transfer wordpress from subdomain to main domain

From Dev

Copy Codeigniter project from Main domain to subdomain

From Dev

htaccess redirect page from subdomain to main domain

From Dev

Redirect from subdomain to main domain navbar dropdown

From Dev

Servicestack hosting on subdomain and authenticating from main domain

From Dev

Possible to upload from a subdomain to the main domain?

From Dev

How should I link a CSS file for the subdomain from the main domain?

From Dev

Is it possible to include virtual files from the main domain in a subdomain in asp?

From Dev

How should I link a CSS file for the subdomain from the main domain?

From Dev

how to Copy Images from Main Domain to Subdomain Folder in c#

From Dev

How to 301 redirect from subdomain directory to main domain directory?

From Dev

htaccess Mod_Rewrite from Main Domain to SubDomain

From Dev

Redirect subdomain to main domain in Joomla

From Dev

https for main domain and http for subdomain

From Dev

Redirect subdomain to main domain in Joomla

From Dev

.htaccess redirect main domain and not subdomain

From Dev

https for main domain and http for subdomain

From Dev

Access Flask session cookies from custom domain

From Dev

.htaccess SSL problems main domain vs subdomain

From Dev

Why is my subdomain redirecting to my main domain?

From Dev

subdomain of wordpress keep redirecting to main domain

From Dev

Redirect all subdomain to main domain .htaccess

From Dev

CentOS + apache subdomain always redirect to main domain

From Dev

Redirect subdomain and path to main domain with same path

From Dev

Main domain with codeigniter, subdomain without codeigniter

From Dev

subdomain of wordpress keep redirecting to main domain

From Dev

Redirect all subdomain to main domain .htaccess

From Dev

Redirect main domain to subdomain, but keep a subdirectory

From Dev

SRV record to use subdomain to portforward to main domain

Related Related

  1. 1

    transfer wordpress from subdomain to main domain

  2. 2

    Copy Codeigniter project from Main domain to subdomain

  3. 3

    htaccess redirect page from subdomain to main domain

  4. 4

    Redirect from subdomain to main domain navbar dropdown

  5. 5

    Servicestack hosting on subdomain and authenticating from main domain

  6. 6

    Possible to upload from a subdomain to the main domain?

  7. 7

    How should I link a CSS file for the subdomain from the main domain?

  8. 8

    Is it possible to include virtual files from the main domain in a subdomain in asp?

  9. 9

    How should I link a CSS file for the subdomain from the main domain?

  10. 10

    how to Copy Images from Main Domain to Subdomain Folder in c#

  11. 11

    How to 301 redirect from subdomain directory to main domain directory?

  12. 12

    htaccess Mod_Rewrite from Main Domain to SubDomain

  13. 13

    Redirect subdomain to main domain in Joomla

  14. 14

    https for main domain and http for subdomain

  15. 15

    Redirect subdomain to main domain in Joomla

  16. 16

    .htaccess redirect main domain and not subdomain

  17. 17

    https for main domain and http for subdomain

  18. 18

    Access Flask session cookies from custom domain

  19. 19

    .htaccess SSL problems main domain vs subdomain

  20. 20

    Why is my subdomain redirecting to my main domain?

  21. 21

    subdomain of wordpress keep redirecting to main domain

  22. 22

    Redirect all subdomain to main domain .htaccess

  23. 23

    CentOS + apache subdomain always redirect to main domain

  24. 24

    Redirect subdomain and path to main domain with same path

  25. 25

    Main domain with codeigniter, subdomain without codeigniter

  26. 26

    subdomain of wordpress keep redirecting to main domain

  27. 27

    Redirect all subdomain to main domain .htaccess

  28. 28

    Redirect main domain to subdomain, but keep a subdirectory

  29. 29

    SRV record to use subdomain to portforward to main domain

HotTag

Archive