How to use subdomains?
|
486 posts
|
Instead of having my URLS like this, for example:
I would like to do:
Is there a simple way to do this? |
|
316 posts
|
Usually that’s done through your hosts interface. I have my own Virtual Private Server and I do it through cPanel. |
|
486 posts
|
mtylerb, in the example above, I want the subdomain to actually be a frog page. |
|
257 posts
|
And pull from the main Frog database? Perhaps some additional htaccess on the root of the subdomain will be able to accomplish this ricks? Never tried though! |
|
316 posts
|
So, you would load your Frog files into a folder, for example site.com/miami, then you’d go through your host’s interface and setup the subdomain miami.site.com to point to that folder. Some hosts will let you point the subdomain to any folder, but some require the folder to be the same name as the subdomain. From there it acts just like any other site. If you are wanting another folder (restaurants) then, within the miami folder, you would make another folder called restaurants. |
|
486 posts
|
Yeah I want it to pull from the Frog database. It’s just a URL rewriting thing, I suppose, but I don’t know how Frog will handle it. mtylerb, thanks for your suggestions. I’m not sure what you mean by folders, but I don’t want multiple Frog installations. I want site.com itself to be the Frog site, and the only Frog site. I just want the subdomains as an alias sort of thing… |
|
316 posts
|
I see, you could check with your host to see if they will let you point a subdomain to your root folder, then just make frog do a url check to see if miami is in the url. For example, in my cPanel, I can set up using this screen:
The Subdomain field is pretty obvious, then I choose a domain that I want that subdomain associated with, then choose which folder I want that subdomain associated with. As you can see in the screenshot, I have the subdomain stats.tbeckett.net associated with /public_html/stats/ without redirecting (meaning it keeps the address stats.tbeckett.net instead of redirecting you to www.tbeckett.net/stats/). Maybe you could have “miami.site.com” point to “www.site.com” without redirection and have a function that tests to see if miami is in the url? |
