subdomain

Creating Subdomains Programmatically

家住魔仙堡 提交于 2019-12-03 08:45:53
问题 I am looking for a solution to create subdomains programmatically in ASP.NET, ASP.NET MVC and PHP. Specifically, a user profile page should resolve for both: www.domain.com/profilename or http://profilename.domain.com . 回答1: Update your DNS settings of the particular domain so that *.domain.com all point to the same host. Then, programmatically check and see if the first part of the URL used contains the subdomain you are looking for, and act accordingly. For example, if the first part

Subdomains and Logins

情到浓时终转凉″ 提交于 2019-12-03 08:35:12
If you multiple subdomains e.g.: sub1.domain_name.com sub2.domain_name.com Is there a way to have a user be able to log into both of these without issues and double login issue? The platform is Python, Django. Without information regarding what platform you are using, it is difficult to say. If you use cookies to store authentication information, and you are using subdomains as you describe, then you can force the cookie to be issued for the highest level domain, e.g. domain_name.com. This will be accessable by both sub1 and sub2, and they could each use that for their authentication. EDIT: In

Subdomain redirecting to another server

孤街醉人 提交于 2019-12-03 08:17:15
问题 I have a website hosted on a shared hosting plan. My domain name is registered at GoDaddy, and the nameservers are those of my shared hosting (so far, all normal). But I'm trying to figure out how to add a subdomain and point it somewhere else. I would like to point sub.mydomain.com to some other ip (on Amazon AWS). I would like to have it behave like a normal domain, and not a simple header('Location: ...') or window.location.href. Is this even possible? If so, how do I do? Thanks 回答1: Yes

Auth::user() doesn't travel across subdomains? - Laravel 5.2

隐身守侯 提交于 2019-12-03 07:47:39
I have a subdomain in my site, for example: http://example.ca http://blog.example.ca The blog one is only accessible to people who have the url, that is, its not public or common knowledge. I have a bunch of routes related to this domain that requires you to be logged in. I have stated in a nav.blade.php that if the user is logged in, there should be a drop down and if not then there should not be a drop down. this all works for http://blog.example.ca but when I go to http://example.ca I am not authenticated any more. Is there any way in larval to make me authenticated across all subdomains?

How do I delete a cookie from a specific domain using Javascript?

雨燕双飞 提交于 2019-12-03 07:35:45
Let's say I am at http://www.example.com and I want to delete a cookie whose domain is .example.com and another one whose domain is www.example.com . I am currently using this generic function : var deleteCookie = function (name) { document.cookie = name + '=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;'; }; which only seems to be removing cookies whose domain is www.example.com . But how can I specify so that it also removes cookies whose domain is .example.com ? EDIT : Basically I'm looking for a function that can delete all cookies related to http://www.example.com as long as they don't

nginx server configuration: subdomain to folder

社会主义新天地 提交于 2019-12-03 07:12:03
问题 I migrated from Apache 2 to nginx and I've got problems to handly my subdomain control. What I want: When x.domain.tld is requested, internally rewrite to domain.tld/x The problem I've got is that nginx always redirects the page by telling the browser to redirect to. But what I really want is to do this internally, like Apache 2 did. Also, if I only request x.domain.tld, nginx returns a 404. It only works when I do x.domain.tld/index.php Here's my config: server { listen 80 default; server

How to create a subdomain and how do they work?

大兔子大兔子 提交于 2019-12-03 06:38:50
问题 I would like to create a subdomain off of my main domain for accessing my raspberry pi at home. My domain register company charges £10 for every subdomain so I thought there might be an easier (and cheaper) way of creating one. It would also help if I knew a little more about them and how they are created. 回答1: DNS is built off of a hierarchy for scale-ability and/or for granularity. If we take the a domain like www.stackoverflow.com. and break it down, here is what we get. www - This is the

ASP.NET MVC - cross sub domain authentication/membership

狂风中的少年 提交于 2019-12-03 05:15:38
问题 Hit a roadblock while implementing a sub domain based language switcher (en.domain.com loads English, jp.domain.com loads Japanese). How do I get a single membership system to work across multiple sub domains (ASP.NET MVC C#)? Saw something about adding domain="domain.com" to <forms > entry in web.config. Did that, but does that work when testing on local visual studio development web server? 回答1: Try creating the cookie yourself. In AccountController you'll find this: FormsAuthentication

setting up subdomains on nginx [closed]

怎甘沉沦 提交于 2019-12-03 05:09:56
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm trying to set a subdomain on nginx. My setup is a Pylons app running on port 8080 and using proxy from nginx. The reason why I'm trying to get subdomains to work is to eventually set up dev and staging servers. Here is my nginx.conf file: worker_processes 2; events { worker_connections 1024; } http { include

Dynamic subversion repos via subdomains (in Apache)

青春壹個敷衍的年華 提交于 2019-12-03 05:04:05
I'm trying to set up a subdomain-to-repository translation in Apache. Example: foobars.domain.com -> /server/svnrepos/foobars I've tried to get this done with mod_rewrite : RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] RewriteCond %{HTTP_HOST} ^(www\.)?([^.]+)\.domain\.com$ [NC] RewriteRule ^/svn(.*) /svn/%2$1 [PT] However, this causes problems with basic svn operations; 'checkout' causes this pretty thing: $ svn co http://foobars.domain.com/svn svn: '/svn/foobars/!svn/vcc/default' path not found I don't have any limitations in terms of server setup (my machines, os, etc). Is there any way