Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have purchased a domain name which I have assigned an a name record to my Ubuntu web server. On the server each user has their own profile located at /var/www/user, each user has a sub directory. I need a sub domain for each user in the /user directory.
I started by giving the domain a wildcard '*' a name record which points to the server (as well as # (obviously)). Then with a Virtual Host I use the wildcard to check for any requests to a sub domain and set their document root to a redirect directory /var/www/redirect. So essentially I'm filtering out sub domain requests and then sending them to the redirect directory to explode the sub domain they requested and forward appropriately.
My problem lies with trying to get the original sub domain they requested so I can explode the string and find the user they need and redirect. Does anyone know how I can do this? Should I pass it as a GET variable from Virtual Host or is there a better way?
If this sounds like a bad design I'd highly appreciate it if you could suggest a better one!
The original sub domain they requested is in $_SERVER['HTTP_HOST'].
Related
Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 days ago.
Improve this question
I'm trying to recreate what Amazon, Rackspace, etc. have done (sort of) where :
A. Virtual Machines can be start pretty much via a php command(post, socket, whatever)
B. Each machine is associated with an account of sorts, so it also has it's own little domain.
"B" is where I would like help. What are some techniques to map vm's to a custom sub domain?
I can currently start a vm using vagrant, but I'm not sure how to display it's content (make the assumptions these are web server vm's)
I also know you can map something like "bobspickles.domain.com" to "domain.com/action.php?name=bobspickles" , but I'm not sure if I can use this technique to render whatever internal ip address's content as a result... help?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have a website which is developed using asp.net. I have created a new module which is in PHP. Without disturbing the main site I need to host this site.
Is it possible to host like that or not?
Example:
www.vidhyaprakash.com - aspx
account.vidhyaprakash.com - php
Sub domains like domains are just IP addresses with names (or rather names that point to IP addresses). The DNS can be configured to point to any IP address.
You may need to ask your provider to do this for you. They set up a CNAME.
I personally have my web hosting on my main domain, but I have a subdomain which points to a gaming server.
EDIT:
A trick for example, is to have a domain or sub domain which points to a DYN server, which in turn points to a server with a dynamic IP.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
When making a php web site in dream weaver, does the site have to have htdocs folder ?
The problem I have is I have a domain www.whatever.com.
Once I created the index.php in dreamweaver, I hit the put button and it uploads just fine.
So the connection to my website from dreamweaver works.
But when I got to the website www.whatever.com , it shows an apache test page where I want the index.php to show.
The answer to your first question is "no". Every website functions differently and having a htdocs folder is not a requirement by any means.
I suggest trying to upload index.php to the root directory (folder). The "root" is basically the top level folder that you have access to on your hosting account. Then, if that doesn't work, keep trying folders until it does work. As other people suggested, the correct folder can be called "public", "public_html", "www" or something else.
Just be sure you remember where it is located for for future reference. And don't leave a bunch of index.php files scattered in various locations on your server or it could create problems on your website in the future.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have some files in directory and sub directory in an open HTTP site
For Example:
http://example.com/directory/file1
http://example.com/directory/file2
http://example.com/directory/sub-directory/file1
http://example.com/directory/sub-directory/file2
http://example.com/directory/sub-directory2/file1
http://example.com/directory/sub-directory2/file2
I want to copy the full directory to my server.
I don't have SSH or FTP access to the http://example.com
I have tried transloader script which grabs only one file every time.
I need to copy the full directory exactly as is on the HTTP server to my new server.
Thanks
Use wget or curl:
wget -r --no-parent mysite.com
You are unable to do this. You can grab the content of the visual layer/GUI that the site provides to you, but you can not grab any of the "behind the scenes" pages which the site has. You wont be able to get any of the site which is doing the back end processing to create what you see on the front end.
The only way to do do this is if you have access to the directories on the site. By this, I mean when you go to the base directory, such as example.com/test/, it just gives a list of all possible files in that directory. As it stands though, most sites protect against it, therefore unless you have direct access, this is not doable as it would be entirely insecure and would create many headaches for development and privacy.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have never touched a .htaccess file. Can someone help me with the code I would need to replace a domain name with another domain name.
I have 10 domains pointed at the same directory as domain.com. When someone arrive via any of the 10 urls, I want them to see that URL through the entire visit on the site. So I need to do a rewrite that says to take domain.com and change it to $_SERVER['SERVER_NAME']. This variable holds the url a person typed to get to my site.
Please assist me, mod rewriting seems significantly more difficult then I would have imagined.
You can just write some code in your index file to redirect to new domain