subdomain

Dealing with non-hardcoded domain names with mod_rewrite

I am migrating my application which provides a subsite for each user from domain.com/~user to user.domain.com. In order to do this, I wrote the following RewriteRule: RewriteRule ^~([a-z_]+)(/.*)?$ http://$1.%{HTTP_HOST}$2 [R=301,QSA,NC] However, %{HTTP_HOST} doesn't do exactly what I need it to, because if for instance a user browses...

Can Areas in an ASP.Net MVC 2 Application map to a subdomain?

Is there a way to map the Areas within an ASP.Net MVC 2 application to subdomains such as: movies.example.com/Theater/View/2 instead of example.com/Movies/Theater/View/2 (where { area = "Movies", controller = "Theater", action = "View", id = 2 } ) ...

Routing depending on the subdomain

Please help me. I am quite new to kohana. How best to do so the controller was chosen based on the subdomain. For example: www.site.com -> Controller: siteroot. Method: run admin.site.com -> Controller: adminsite. Method: run moderator.site.com -> Controller: moderatorsite. Method: run director.site.com -> Controller: directorsite. Meth...

Is there a way to force traffic comin from www.abc.com to go to abc.com via htaccess or dns?

I am having some trouble with a flash file that has hardcoded urls in it. The flash loads fine if I visit from abc.com. But if I try to view it from www.abc.com it wont load. So my question is, how do I got about forcing all traffic, including that coming from www.abc.com to be directed to abc.com instead. ...

How to map a full domain to a subdomain-based Rails app account?

I'm developing a Rails app that by default sets up user accounts to a subdomain of their choosing. As an option, they will be able to map their own full domain to their account. So far this is how I have things set up. I am using subdomain-fu to power the routing: # routes.rb map.with_options :conditions => {:subdomain => true} do |app...

wget mirror all subdomains

I am mirroring a website starting my crawl from a particular subdomain (eg a.foo.com). How can I make wget also download content from other linked subdomains (eg b.foo.com) but not external domains (eg google.com)? I assumed this would work: wget --mirror --domains="foo.com" a.foo.com However links to b.foo.com were not followed. ...

CSS Images and Cookies

Hello, I've set up a sub-domain on my server that serves css and images (to avoid cookies). The 1st time the page loads, everything is fine. The 2nd time however, I see that the css and images contain cookies. Is there something I'm missing? EDIT: Solution found, the following text clarifies the issue. Restricting google analytics ...

Google app engine and custom subdomain

So, I wrote my own application which is hosted on Google app engine., and can be accessed on URL like this: http://myapp.appspot.com/ - where "myapp" is the name/id of my application. I want the app to be accessible on subdomain I don't own (myapp.somedomain.com), and want to give admin of somedomain.com info he needs to set it up. The...

create subdomain address of subdomain that does not exist, to redirect to the main domain

Would it be possible to set a 301 redirect for sub.domain.com to redirect to domain.com/directory even when the subdomain does not exist. ...

install wordpress on subdomain or subdirectory on another server

Hi, we have a www.domain.com and would like to run Wordpress on another server e.g. on http://blog.domain.com or http://www.domain.com/blog/ What would be the easiest to configure and what should we do to configure our blog this way? Is this a DNS question or can it be done easier? ...

How to handle and identify multiple sub-domains

Hi, I am planning for multiple sub-domain names based on city, something like city1.mydomain.com, city2.mydomain.com, ... All sub-domains will point to same file structure on main domain. Then in my program I would like to capture the city name and display content based on city. What is the best approach to identify the city (based on ...

mod_rewrite: url rewriting plus subdomain (wildcard) rewrite at the same time

i have two rules in my .htaccess file for url rewriting: for subdomain rewriting: xxx.domain.com is internally redirected to file.php?item=xxx RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC] RewriteCond %{HTTP_HOST} ^(www.)?([^.]+).domain.com$ [NC] RewriteRule ^$ /file.php?item=%2 [QSA,nc] ordinary rewriting: RewriteRule ^([A-Za-z0...

Subdomains and locally installed Rails app

I can't figure out what I'm overlooking, perhaps it's obvious or lack of understanding. The app I'm working with uses subdomains which on the hosting server work properly. I figured locally installing would kick up some issues around routing, so I read up on making changes to /etc/hosts and using the Ghost gem. Both seem to work fine i...

Difficult issue with subdomain cookies - how to handle writes/read in redirects.

I'm using Perl for this but I'm not sure that matters here, this is raw HTTP. I have various services which I've built a central login for. The services can be run off-site by third parties and I handle all the handshakes securely, with the central site always maintaining login state with sessions and session cookies. The problem I'm ...

Asp.net mvc 301 redirect from www.domain.com to domain.com

We have a website at domain.com, which is also accessible via a CNAME entry for www.domain.com that points back to domain.com. We'd like all visitors to www.domain.com to be redirected to domain.com using a 301 redirect. What's the best way to implement this in asp.net mvc? In global.asax? ...

clientaccesspolicy.xml and subdomain

my site has a subdomain, I use this policy with my silverlight app, <?xml version="1.0" encoding="utf-8" ?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="http://dev.system-engine.com"/&gt; </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </gr...

Rails: Alternative ways to serve multiple layouts? e.g. iphone.example.com vs. example.com/iphone

I can use this method to signal an alternative layout. someformat.example.com but when I cache that it will be in, for example public/someformat Why involve DNS and the web server if I don't have to? Is there a way to make a Rails app just stay in a url subdir, i.e. to make all url generation relative? I'm attempting this for a Fa...

Localhost 's subdomain with port numbers, how to?

We know that to add a subdomain for localhost, we open and edit the host file by adding lines such as: 127.0.0.1 localhost 127.0.0.1 abc.localhost 127.0.0.1 xyz.localhost My problem is that: if I browse abc.localhost:88 I get the below error: Bad Request - Invalid Hostname HTTP Error 400. The request hostname is invalid. Why d...

Creating subdomains on the fly

When one signs up for Blogger or WordPress, one gets very own subdomain that works instantly. How can do like that given I have my own VPS/VDS/Dedicated server? ...

TinyMCE in PHP whit sub.domain.com

Hello all i have this config file http://pastebin.org/85981 the problem is before i have change $mcImageManagerConfig['filesystem.rootpath'] from simplecms.info to cms.schemecloud.com its have no problems, but after i have change the domain its giving problem when i select the URL its only comming whit .com and not cms.schemecloud....