subdomain

Should I default my website to www.foo or not?

半世苍凉 提交于 2019-11-28 18:19:22
Notice how the default domain for stackoverflow is http://stackoverflow.com and if you try to goto http://www.stackoverflow.com it bounces you to http://stackoverflow.com ? What is the reason for this? Not the tech reason (as in the http code, etc) but why would the site owners want to do this? I know it's purely aesthetic and I always have host-headers for both www and not, but is there a reason to bounce a user to a single domain, subheaded or not? Update 1 Not having a subdomain is called a bare domain . Thanks peeps! never knew it had a term :) Update 2 Thanks for the answers so far -

Working with subdomain in google app engine

烂漫一生 提交于 2019-11-28 17:59:33
问题 How can I work with sub domain in google app engine (python). I wanna get first domain part and take some action (handler). Example: product.example.com -> send it to products handler user.example.com -> send it to users handler Actually, using virtual path I have this code: application = webapp.WSGIApplication( [('/', IndexHandler), ('/product/(.*)', ProductHandler), ('/user/(.*)', UserHandler) ] 回答1: WSGIApplication isn't capable of routing based on domain. Instead, you need to create a

nginx - two subdomain configuration

你说的曾经没有我的故事 提交于 2019-11-28 17:21:11
问题 I'm new to Nginx and I'm trying to get subdomains working. What I would like to do is take my domain (let's call it example.com ) and add: sub1.example.com , sub2.example.com , and also have www.example.com available. I know how to do this with Apache, but Nginx is being a real head scratcher. I'm running Debian 6. My current /etc/nginx/sites-enabled/example.com: server { server_name www.example.com example.com; access_log /srv/www/www.example.com/logs/access.log; error_log /srv/www/www

Setting a cookie on a subdomain from an ajax request

懵懂的女人 提交于 2019-11-28 17:19:02
I have a webapp on www.example.com and an API on api.example.com. The webapp makes ajax calls to the API. Somewhere I need to put a cookie on api.example.com to keep sessions track. To track my problem I've set test cookies on both subdomaines from the webapp and the api. The webapp set a cookie on .exemple.com and the api set one on .exemple.com and another on api.exemple.com. Cookies are set using Domain=.exemple.com only. No path, no HTTPOnly. Note: In the end I need only one on api.exemple.com. But theses are for the tests. Direct queries using my browser (Firefox 16) works fine. Query on

Domain IP address for www and non-www for Canonical URL

老子叫甜甜 提交于 2019-11-28 16:39:25
To handle Canonical URL is it best practice to do a 301 redirect or better to have the same IP Address for both www and non www domain? For example: Canonical URL/domain wanted is http://mydomain.com Domain | A Record ------------------------------------ mydomain.com | 58.162.62.34 www.mydomain.com | 58.162.62.34 I understand people may have a CNAME record for www (alias, given that CNAME is called Canonical Name); unsure if this is best practice compared to using the same IP address. Or is this better. Domain | A Record ------------------------------------ mydomain.com | 58.162.62.34 * www

subdomain vs. subdirectory in web programming

£可爱£侵袭症+ 提交于 2019-11-28 16:29:49
问题 There are two main strategies for handling multiple "applications" on the web: subdomains (e.g. wiki.example.org, blog.example.org, admin.example.org, api.example.org/v1) subdirs (e.g. example.org/wiki, example.org/blog, example.org/admin, example.org/api/v1) What are the differences (advantages and disadvantages) of these two solution when dealing with web programming (e.g. in terms of code organization, browsers security models, javascript etc). Edit: CW as there's a correct answer, but it

Creating subdomains in Amazon EC2

孤者浪人 提交于 2019-11-28 16:13:52
How can I create subdomains on Amazon EC2? Is adding virtual host in httpd.conf is enough.. or any other changes also needs to be done? Thanks cvaldemar Depends on your server software. But as you mention httpd.conf, chances are good that you run Apache on a Linux distribution. If that's the case then yes, adding a virtual host is enough. Here is one way of doing it: Purchase a domain. If you have one, skip this, we'll take example.com for this example. Find the external IP or DNS for your EC2 instance. You probably want to associate an Elastic IP to your instance, otherwise the IP of your

How do you map a sub domain to a webapp on Tomcat 6 (including the root webapp)?

我们两清 提交于 2019-11-28 16:02:10
问题 subject says it all. What I want is to map each sub domain to a webapp like: http://root.domain.com:8080 -> http://domain.com:8080/ http://manager.domain.com:8080 -> http://domain.com:8080/manager http://abc.domain.com:8080 -> http://domain.com:8080/abc http://def.domain.com:8080 -> http://domain.com:8080/def on a localhost machine this would be http://root.localhost:8080 -> http://localhost:8080/ http://manager.localhost:8080 -> http://localhost:8080/manager http://abc.localhost:8080 -> http

How can I programmatically generate Heroku-like subdomain names?

不想你离开。 提交于 2019-11-28 15:45:49
问题 We've all seen the interesting subdomains that you get automatically assigned when you deploy an app to Heroku with a bare "heroku create". Some examples: blazing-mist-4652, electric-night-4641, morning-frost-5543, radiant-river-7322, and so on. It seems they all follow a adjective-noun-4digitnumber pattern (for the most part). Did they simply type out a dictionary of some adjectives and nouns, then choose combinations from them at random when you push an app? Is there a Ruby gem that

Subdomain on different host [closed]

那年仲夏 提交于 2019-11-28 15:04:46
I'm trying to host a subdomain for my site with a different hosting company and I'm running into issues on how to set it up. Here are the specifics: - Domain is registered with GoDaddy. - Nameservers are pointing to DiscountASP.net where ASP.NET app has been happily running for couple of years. - Would like blog.mydomain.com to point to my account with DreamHost.com to take advantage of their LAMP stack. I have added blog.mydomain.com to DreamHost (after adding mydomain.com) via their control panel. I thought I would be able to add a subdomain entry on GoDaddy to point to DreamHost, but all