subdomain

Why did ASP.NET generate the same cookie key for a domain and subdomain?

杀马特。学长 韩版系。学妹 提交于 2019-12-06 08:18:21
Bug: I've got an ASP.NET web application that occasionally sets identical cookie keys for ".www.mydomain.com" and "www.mydomain.com". I'm trying to figure out what default cookie domain ASP.NET sets, and how I accidentally coded the site to sometimes prepend a "." to the cookie domain. When 2 cookies have the same key and are sent up from the browser, the ASP.NET web application is unable to differentiate between the two because the domain value is not sent in the header. (See my previous question ) Evidence: I've enabled W3C logging on the web server and verified that both cookies are sent

Rails: Dividing up a single database between multiple subdomains

天涯浪子 提交于 2019-12-06 07:56:59
问题 I'm relatively new to Rails, and here is my situation: I'm building an inventory management app with rails to help three separate branches of a company manage their own product inventory. Each of these three branches are keeping track of the same products, use the same data models, but are managed separately. My plan is to build a single app using a single database, but one that keeps track of the inventory in all three branches. My plan is to have something like this: branch1.inventoryapp

Junk characters in URL when domain forwarding

戏子无情 提交于 2019-12-06 07:26:20
I'm facing this issue lately, I have forwarded my domain to one of the files which are hosted on my GoDaddy shared hosting. However, whenever I hit the domain name in the browser it leads to the respective file (.html ) along with the junk characters preceding. Example: www.domainname.info Leads to: https://www.mydomainname.in/coffee.html/NjSmZ/KiKgZ/ Result: Error 404 page not found. Haven't changed any code; it's a sudden behavior. UPDATE (more info): The NjSmZ/KiKgZ/ are the junk characters in the link. Forwarding is made through the GoDaddy domain forwarder itself. No external coding is

Mapping a subdomain to a Servlet context using Apache 2.x and Tomcat 6.x

荒凉一梦 提交于 2019-12-06 07:10:50
问题 I have installed Archiva on my machine under Tomcat 6.x at http://dev.mycompany.com:8080/archiva and can access the application and everything, but I want to access it from the subdomain archiva.mycompany.com . I have Apache 2.x running on port 80 and using Virtual Hosts and mod_proxy to route from other subdomains to the other various services I am running on this machine. I now want to create a subdomain archiva.dev.mycompany.com and point that to dev.mycompany.com:8080/archiva . I can't

Maintaining login session across subdomains in nodejs mongostore

瘦欲@ 提交于 2019-12-06 06:49:49
问题 I'm developing a nodejs web application, in that I have multiple subdomains like domain.com, sub1.domain.com, sub2.domain.com etc. if user logs in to sub1.domain.com and gets redirected to domain.com or sub2.domin.com it will give as not logged in, How can I maintain this session across sub-domains and in main-domain? I'm using express, nodejs, mongodb. app.use(session({ secret: "secrete key", store: new MongoStore({ db: "session-db" }) })); I tried setting up like this, didn't work: app.use

Creating subdomain in virtualhost in apache 2.0 on CentOS 6.4

天大地大妈咪最大 提交于 2019-12-06 06:17:57
I need to create subdomains on a web server with apache 2.0 , CentOS 6.4, PageSpeed ​​+ Apc. I have no DNS server. I need to use VirtualHost. My code: NameVirtualHost xx.xx.xx.xx <VirtualHost xx.xx.xx.xx> ServerName www.sub.domain.com ServerAlias sub.domain.com DocumentRoot /var/www/html/sub </VirtualHost> <VirtualHost xx.xx.xx.xx> ServerName www.domain.com ServerAlias domain.com DocumentRoot /var/www/html </VirtualHost> I have put this code in: /etc/httpd/conf.d/somename.conf and it does not work. Also in: httpd.conf , does not work. I'm doing the following: <VirtualHost *:80> DocumentRoot "

Rails 4 Dynamic Subdomains

走远了吗. 提交于 2019-12-06 06:13:05
Hi I am following the tutorial at http://railscasts.com/episodes/221-subdomains-in-rails-3 and trying to make it work for rails 4. The problem I encountered is in the my controller and with the find_by_subdomain! tag, I have read that most of the the find_by methods where taken out of rails 4, and was wondering what the work around was. my controller currently looks like def set_city @city = City.friendly.find_by_subdomain!(request.subdomain) end and the error I am getting is undefined method `find_by_subdomain!' Also in case it helps my routes currently look like get '/' => 'cities#show',

Get root DNS entry from php server; get domain name without www, ect

有些话、适合烂在心里 提交于 2019-12-06 05:34:56
How would one get the root DNS entry from $_SERVER['HTTP_HOST'] ? Input: example.co.uk www.example.com blog.example.com forum.example.co.uk Output: example.co.uk example.com example.com example.co.uk EDIT: Lookup list is very long For this project: http://drupal.org/project/parallel Usage: echo parallel_get_domain("www.robknight.org.uk") . "<br>"; echo parallel_get_domain("www.google.com") . "<br>"; echo parallel_get_domain("www.yahoo.com") . "<br>"; Functions: /** * Given host name returns top domain. * * @param $host * String containing the host name: www.example.com * * @return string * top

Rails page caching with subdomain

笑着哭i 提交于 2019-12-06 05:28:23
Has anyone successfully implemented rails page caching with subdomains? Right now the same file is being served up between subdomains as rails does not recognize the fact that the subdomain has changed. I'd like my page caches to look something like this: /public/cache/subdomain1/index.html /public/cache/subdomain1/page2.html /public/cache/subdomain2/index.html /public/cache/subdomain2/page2.html I'm using nginx for serving up these pages so will need to change it's config file to find these files once they're cached, that won't be a problem. The sticking point for me at the moment is on the

Sessions and subdomains

☆樱花仙子☆ 提交于 2019-12-06 05:15:08
I've been trying to get my sessions running across my subdomains, which I'm pretty sure I got working on Monday but after adding some code Tuesday its not working Wednesday! I've used the code ini_set("session.cookie_domain", $domain); where $domain = .example.com . My site's main page is currently located on test.example.com and I access the login page through test.example.com/login . When i enter this address, the url in the address bar is automatically changed to http://www.test.example.com/login , and this is where the problem lies. The session is created for www.test.example.com but most