subdomain

htaccess mod rewrite $_GET to variables with slashes

…衆ロ難τιáo~ 提交于 2019-11-29 14:55:24
问题 I would like to rewrite URL's with htaccess to better readable URL's and use the $_GET variable in PHP I sometimes make use of a subdomain so it has to work with and without. Also are the variables not necessary in the url. I take a maximum of 3 variables in the URL the URL sub.mydomain.com/page/a/1/b/2/c/3 should lead to sub.mydomain.com/page.php?a=1&b=2&c=3 and the url sub.mydomain.com/a/1/b/2/c/3 should lead to sub.mydomain.com/index.php?a=1&b=2&c=3 where $_GET['a'] = 1 I came up with this

Local debugging of subdomains with VS 2015

无人久伴 提交于 2019-11-29 14:40:04
问题 I have a multi-tenant website that has to take care of any incoming request and determine the appropriate routing by the URL subdomain. I set up the subdomain routing using this or a similar solution. However I'm trying to access my website on my local machine using subdomains an alias website. I'm unable to get my local IIS to port to my website with the subdomain I've specified. I want to dedicate a virtual domain name in my local machine that will port to the website I'm debugging on VS (

How can I refer to a relative subdomain in HTML?

孤街醉人 提交于 2019-11-29 13:39:11
Let's say I have a website which is accessed by multiple domains, e.g. domain1.com and domain2.com . If I have a relative link, such as href="/wiki" , then no matter what domain name I access the website by, that link will take me to the correct place. Lets say instead I wanted to use wiki.domain1.com and wiki.domain2.com , is there some way I can make a link to this relative to the domain name? If not, is there an elegant way to handle a link such as the wiki link above when multiple domains point to the same server? No. You'll have to give the whole domain. To link from domain1.com to wiki

how do i create personal sub domain programmatically with php

≡放荡痞女 提交于 2019-11-29 12:53:16
if I like to create per user sub domain , how technically do I do this ? for example if user XXX is registered to my site and I what to associated him the sub domain http://xxx.mydomain.com/ or http://www.mydomain.com/xxx/ what is the procedure to make it ? You need to setup a wildcard DNS record to catch all subdomains and send them to you web server. Then you need to setup Apache to catch all named virtual hosts and send it to a directory. In the directory you would set htaccess to send all requests to one script which would read the sub domain from the server variables and handle it

Setting cookies for subdomain

点点圈 提交于 2019-11-29 12:28:24
i'm making a web app in a restful way. For my client side i'm using angularJs, the same is hosted at - lets say - https://domain.com My backend is built on spring boot and i call all the resources from a subdomain - lets say - https://xyz.domain.com Now when a user logs in , the backend sends an http only cookie to the client. I can see the cookie in response header but its not being set in the browsers cookie. After a bit of research, i have tried sending cookie with domain = .domain.com but that didnt work either. Is there a way i can set cookie coming from xyz.domain.com for my client side

Firebase hosting: Serve different pages from different custom domains

人走茶凉 提交于 2019-11-29 11:11:59
We're using custom domains on firebase hosting: our app, served from index.html, runs nicely on app.example.com. We've also connected www.example.com, which serves the app as well. The problem is: on www.example.com I want to be able to host a simple static page. Is there a way to configure this in the rewrites? We can easily output an extra html file in the deploy, next to index.html. Any ideas? Our firebase.json: { "database": { "rules": "database.rules.json" }, "hosting": { "public": "public", "rewrites": [ { "source": "**", "destination": "/index.html" } ] } } Firebase Hosting does not

How to dynamically create subdomains

走远了吗. 提交于 2019-11-29 11:11:48
I want to dynamically create new sub domains on my website. i mean if you have example.com then you dynamically create sub.example.com . i looked on google and there was nothing really good. i downloaded some scripts but they were all not working. my website is based on php so please if there is anyway i can do it in php tell me, and also if it can be possible with python then that is awesome!. You need to setup a wildcard subdomain. Basically, anything.mysite.com will resolve to mysite.com. At that point it's up to your code to kick in and serve up the proper content depending on what

Subdomains in a Rails 4 app

∥☆過路亽.° 提交于 2019-11-29 10:28:46
问题 Today I came across a rather weird phenomenon. When developing a Rails app in which every user has his own subdomain, and trying to use Devise to do it, I encountered that also subdomains not registered whatsoever would route to the root page. So, for example, even if there was no (explicit) subdomain, it would route me to the main application page. Maybe this has to do with my particular setup? I also tried with a new Rails project, but I got the same result. Anyone able to clarify this for

Regex to match Domain.CCTLD

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 10:19:56
Does anyone know a regular expression to match Domain.CCTLD? I don't want subdomains, only the "atomic domain". For example, docs.google.com doesn't get matched, but google.com does. However, this gets complicated with stuff like .co.uk , CCTLDs. Does anyone know a solution? Thanks in advance. EDIT: I've realized I also have to deal with multiple subdomains, like john.doe.google.co.uk . Need a solution now more than ever :P. Based on your comment above, I'm going to reinterpret the question -- rather than making a regex that will match them, we'll create a function that will match them, and

Setting cookies for multiple sub-domains

☆樱花仙子☆ 提交于 2019-11-29 10:04:04
Is it possible to set a cookie for http://www.example.com from a PHP file located at https://secure.example.com ? I have some code that was given to me, that appears to try and fails at this. I was wondering if this is possible at all. Webpages can only set cookies for the second (or higher) level domain that they belong to. This means that secure.example.com can read and set cookies for secure.example.com or .example.com , the latter of which can also be read and set by www.example.com One last note: If the secure flag is set on a cookie, it can only be read and set over an https connection.