subdomain

Cross-domain JavaScript code with sibling sub-domains

左心房为你撑大大i 提交于 2019-11-30 05:27:15
问题 I have two web applications setups: david .example.com and john .example.com David opens a new window to John: window.open('john.example.com'); John would now like to set an input element back on David: $("#input", window.opener.document).val("Hello David."); My problem is that this doesn't work on most modern browser because of cross-domain scripting security. I've also tried setting document.domain to different domain combinations both on David and John with no success. The only time this

Symfony dynamic subdomains

爷,独闯天下 提交于 2019-11-30 05:08:46
I'm trying to match subdomains to a customer id in symfony. i.e. i have customer1.example.com and customer2.example.com Domains are stored in a table. When a user goes to customer1.example.com, I would like to get the subdomain, look up the domain name in the database, once matched, it will then deploy the app config for that customer and then store the customer_Id in a global attribute so i know exactly which customer I'm dealing with througout the whole application. The virtual host will have the relevant wildcard servername. Have you managed to achieve this, and if so, how? If not, any

How can I handle subdomains with one laravel installation

时光毁灭记忆、已成空白 提交于 2019-11-30 05:07:10
I am creating a laravel project for which I need one laravel installation and use its instance in sub-domain with separate database . And those separate database's info will not be in config/database.php. It will get from master database and then reconnected to the other database. I didn't find any proper way to do this. Do you have any idea on this ? Thanks for your time. Laravel supports multiple Database connections. Firstly, define the connections in config/database.php : <?php return array( 'default' => 'default_connection', 'connections' => array( // domain.com 'default_connection' =>

Forms Authentication across Sub-Domains on local IIS

允我心安 提交于 2019-11-30 04:55:28
问题 I know a cookie can be shared across multiple subdomains using the setting <forms name=".ASPXAUTH" loginUrl="Login/" protection="Validation" timeout="120" path="/" domain=".mydomain.com"/> in Web.config. But how to replicate same thing on local machine. I am using windows 7 and IIS 7 on my laptop. So I have sites localhost.users/ for my actual site users.mysite.com localhost.host/ for host.mysite.com and similar. 回答1: localhost.users and localhost.host is cross domain. Cookies cannot be

Running Google App Engine application on multiple customer domains

风流意气都作罢 提交于 2019-11-30 04:02:45
I want to allow my company’s customers to integrate our Google App Engine application into their domains. For example, let’s say one customer owns the domain coolcustomer.com and wants to make our app accessible at service.coolcustomer.com . This article discusses how to set up multi-tenancy internally, but does not mention how to associate client domains with an app. Ideally, I’d like to allow customers to associate a sub-domain in a self-service manner. This, of course, brings up the issue of validating that the customer has permission to add a sub-domain to a domain name. What is the best

Dynamic subdomains in asp.net mvc

随声附和 提交于 2019-11-30 03:57:26
I am fairly new to asp.net, and have little experience with iis. I would like to have each user of my application get their own sub-domain, but all use the same controllers. The subdomain would then control what content is displayed. Example: user1subdomain.mydomain.com/Whatever user2subdomain.mydomain.com/Whatever Will both use the same controller. Ideally a parameter could give the user name to the controller, which could then display the appropriate content. I would like it to be flexible enough that new subdomains could be added to the database without rewriting routing rules every time a

Rails Restful Routing and Subdomains

﹥>﹥吖頭↗ 提交于 2019-11-30 03:28:28
I wondered if there were any plugins or methods which allow me to convert resource routes which allow me to place the controller name as a subdomain. Examples: map.resources :users map.resource :account map.resources :blog ... example.com/users/mark example.com/account example.com/blog/subject example.com/blog/subject/edit ... #becomes users.example.com/mark account.example.com blog.example.com/subject blog.example.com/subject/edit ... I realise I can do this with named routes but wondered if there were some way to keep my currently succinct routes.rb file. The best way to do it is to write a

*.mydomain.com - A record or CNAME?

ぐ巨炮叔叔 提交于 2019-11-30 01:11:51
Some people are saying use an A record and others a CNAME for a catch all subdomain. Which should I use and why? It won't really matter if you CNAME or A record the *.example.com record. The one benefit to CNAME is that if you change your A record for www.example.com you won't need to change the *.example.com record as well, but that's minimal. I think question is about to understand A & CNAME records deeply. I have also found this confusing but after reading couple of blogs, I came up with following understanding: The A and CNAME records are the two common ways to map a host name (name

how to create subdomains in apache(xampp) server?

喜欢而已 提交于 2019-11-29 23:57:24
I've trying to create subdomain in my local xampp installation for some time. I tried editing my httpd.conf file and I entered the following: NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot /ecommerce ServerName ecomm.localhost </VirtualHost> I also edited my windows hosts file and entered: 127.0.0.1 ecomm.localhost But when I type 'ecomm.localhost' in my firefox it gives me: Access forbidden!!! Can please anybody help me out? What exactly I'm doing wrong? I'm fairly new to this. I simply want to create multiple folders in my 'htdocs' folder and use them as different websites with

How to create a subdomain with username as subdomain name?

自作多情 提交于 2019-11-29 23:22:22
I have referred other related question but they are not clear to me. Please explain me: How can I make subdomain in PHP? Example : http://www.domainname.com/page.php?usname=sundar I want change the link to this http://sundar.domainname.com Is this possible in PHP? Or any other way to do it? You may create a virtual sub domains and then you can redirect it with .htaccess. You also have to create A Record look like this * .exmple.com A 127.0.0.1 or your IP in your DNS. Then add something like this in your .htaccess RewriteRule ^([aA-zZ])$ home.php?username=$1 RewriteCond %{HTTP_HOST} ^(^. )