subdomain

Sharing a session between Ruby and PHP

☆樱花仙子☆ 提交于 2019-12-01 02:58:02
问题 Is it possible to share a session between my PHP app on a subdomain and my Ruby apps on my other subdomains? I don't really know where to take it from here. I know I can manually set the domain to the root one so that the cookie is valid for all the subdomains, but how would I get/set stuff from/to the session so that it's shared across the subdomains? I mainly want to use this to share login for my whole subdomains. For the sake of knowledge, if it is the wrong approach to the problem,

Get domain without subdomain from a URL

时光毁灭记忆、已成空白 提交于 2019-12-01 02:40:13
What is the proper way to get the domain from a URL without the subdomains? In Java, from a string you can make a new URL(urlString) and call getHost() on the URL, but you have subdomains with it. The problem is because there can be hosts like: subhost.example.com and subhost.example.co.uk There are several other of these two part domains like co.uk (see the list on https://wiki.mozilla.org/TLD_List ). It seems to me the only correct way to get only the domain is to do a search through the TLD list, remove the TLD from the end of the host, and take away everything before the last period in the

subdomain rewriting in ASP.NET?

拈花ヽ惹草 提交于 2019-12-01 00:44:36
How do i do this in .NET? http://why.does.my.head.asplode.net/ I want to do something like ytmnd where each url is a different user generated page. I might need something as simple as pointing to a directory so dirname.mysite.com will redirect to http_public/userGenContent/dirname/ HAHA ... I handled the Begin request event in global.aspx for this because my urls come from sql server. Why are so many people sub domain crazy these days? in Begin Request you can do something like this (not usre exactly because I aint got it in front of me right now) ... request.rewriteurl( "new url" ); ... this

How to upload laravel project on subdomain?

…衆ロ難τιáo~ 提交于 2019-12-01 00:17:27
I want to host a laravel project in a subdomain.. For that first First I create a subdomain name registraion. And inside the publicm_html/registraion i upload the project file. But when I see the project on url I saw only files not the project I stored. what's the problem of uploading the laravel project? Can anyone help me to find it out? Assuming you are using cPanel to create subdomain. Below are the general steps that are required to setup sub-domain for laravel-project. Create your sub-domain Upload your laravel project to the sub-domain home directory. After you have uploaded all the

Force HTTPS and WWW for domain and only HTTPS for subdomains HTACESS

只愿长相守 提交于 2019-12-01 00:08:11
I've been trying to configure this for my website, but not being able to. I use to have a cond on my .htaccess to force www for the main domain and nothing for subdomains, but since I got a SSL, I'm having some problems. It's a wildcard SSL. What I need is force HTTPS:// WWW on the main domain, and HTTPS:// on subdomains. I.E: http://www.domain.com -> https://subdomain.domain.com Is there any rule for that? Thanks! EDITED Now I'm using like Jon posted RewriteEngine On RewriteCond %{HTTPS} !=on [OR] RewriteCond %{HTTP_HOST} ^domain\.com\.br$ [NC] RewriteRule ^.*$ https://www.domain.com.br%

How do I redirect subdomains that do not exist?

只谈情不闲聊 提交于 2019-11-30 21:48:31
I am trying to redirect using .htaccess in the following fashion. I am not all that familiar with .htaccess, so I'm not sure it can be done. Also, I don't know if how I am intending to do it follows best practices for SEO. www.domain.com > domain.com 301 ks.domain.com > kansas.domain.com 301 ia.domain.com > iowa.domain.com 301 domain.com/sites > domain.com 301 domain.com/sites/iowa > iowa.domain.com 301 nonexistent.domain.com > domain.com 302 domain.com/sites/nonexistent > domain.com 302 My biggest question is if I can detect a nonexistent subdomain and redirect. I would love to see how all of

How to pass SESSION variable to a page in the parent directory?

送分小仙女□ 提交于 2019-11-30 21:33:22
问题 On my web site I would like to have several sub-domains. Files that create context for a given sub-domain are stored in corresponding sub-directory. Sometimes I need to link to the files that do not belong to the sub-domain. For example, on my "subdomain1.mysite.org" I have a link to "www.mysite.org/login.php". The "login.php" is stored in the directory that contains all subdirectories corresponding to the sub-domains. If I make the link to the "www.mysite.org/login.php" in this way: href='..

Cross-domain JavaScript code with sibling sub-domains

放肆的年华 提交于 2019-11-30 21:00:28
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 does work is if John is on example.com and both have document.domain set to example.com . However,

Forms Authentication across Sub-Domains on local IIS

人走茶凉 提交于 2019-11-30 20:54:30
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. localhost.users and localhost.host is cross domain. Cookies cannot be shared cross domain. You could configure it like this so that the sub-domain differs but the root domain stays

Subdomain Session Not Working in Rails 2.3 and Rails 3 on Heroku with/without a Custom Domain?

无人久伴 提交于 2019-11-30 18:17:13
问题 So I have two heroku apps: http://production-app.com (mapped from http://production-app.heroku.com) http://development-app.heroku.com On production-app.com , I have several subdomains using the Heroku custom domains addon with Zerigo (not the wildcard domain addon): http://blog.production-app.com http://api.production-app.com On development-app.heroku.com , I also have those custom subdomains, but since I don't have a custom domain, I just use the wildcard addon. In my routes.rb , using