Slow but steady steady but slow, IIS works, but apache is quirky:
Ok, I've got the redirection sort of working. Basically here's how it's working:
I set up dns, so all *.mysite.com requests are going to the same ipaddress
I pointed mysite.com to the web directory on my server located at "C:/Program Files/whatever....."
Now when I type in anything.mysite.com into a web browser it auto-defaults to the index.html page located in my web directory
First off, can I forward to any other page? or does it HAVE to redirect to index.html (I realize I can put whatever I want into index.html so this is not a big deal)
Here's the next question, how do I access the variables in the url, or how do I set the url variables to begin with? I.E. if I type mcslug.mysite.com and it gets redirected to index.php, how do I reference the name mcslug in a variable, or am I missing a step?
To elaborate on windows, I have IIS now working but in a different way. I have IIS working so that if I type in mysite.com/users/anything it forwards to the page I specified and I can access the variables. Here's how to do that:
In IIS, setup a new virtual directory and call it users
- Right Click on the new virtual directory and go to properties
- change it's virtual directory path to a URL redirection
- for the redirect to path, type in ;/;http://mysite.com/wherever/file.php?path=
the previous statement says take any url that begins with mysite.com and ends with /anything and forward it to mysite.com/where/file.php, the ?path= sets a variable equal to whatever /anything. So in php, you can use $_GET['path'] and it is the /anything value
That's how I got it to work in IIS. So now any pages like http://mysite/com/users/mcslug redirects to my php page and reads mcslug as the variable for pulling down my information.
Now, how do I do this in Apache?