![]() |
Domain mapping
Does anybody know how sites like wordpress.org let users add their own domains to their blogs.
So for example I could add my domain myblog.com and it would point to myblog.wordpress.org. I'm not even sure it's done with PHP *!* but if somebody could point me in the right direction it would be great :-D |
Use mod_rewrite. You can easily create subdirectories with php.
I found this, please post what you come up with! |
Creating the subdomain isn't my problem, I have that working already.
I want users to have the option to use a top level domain if they want. |
Then you are going to start getting into DNS setting etc. You best bet is just to have an external url box and if thats set and valid then redirect to that. But if you want them to have it hosted on yours still then your going to have to be able to change DNS settings etc. Like putting the subdomain into there cname setting etc. Going to be quite hard to do.
|
Really at the minute I just want to get a basic idea of how it would work. Then I can have a look at it once the rest of my site is finished.
Even if I end up paying someone else to do it I dont mind. I just want to get a vague idea of what is involved for it to be done. |
All of their subdomains like username.wordpress.com are probably handled with wildcard dns (http://en.wikipedia.org/wiki/Wildcard_DNS_record). As far as being able to get www.username.com to map to your wordpress site, I don't know exactly what they do, but this solution may work as a workaround:
Use mod_rewrite to serve master.php in place of all html files, something like this: Code:
RewriteEngine onHope that gets you started in the right direction. |
| All times are GMT. The time now is 02:39 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0