开发者

.htacces rewrite to subdomains without wildcard dns

I've googled around quite a bit and also tried some of the solutions I've found. Unfortunately without success. My problem: For a Wordpress install I couldn't do a subdomain setup since I couldn't activate wildcard DNS on my server. This made me set up my Wordpress network install on the main domain and on two 开发者_C百科subdirectories as below:

domain.be

domain.be/alpha

domain.be/beta

I can however make set subdomains on my server, so I set up the following:

alpha.domain.be

beta.domain.be

I'm now trying to use .htaccess to rewrite this, so that people who go to domain.be/alpha are automatically redirected to alpha.domain.be - and obviously the same for the second (beta) subdirectory. As far as I can see, I should be able to pull this off without using dns wildcards. Unfortunately, I'm too inexperienced with .htaccess rules to pull this off. Anyone out there who can help me with this?

If you have your doubts about this set-up, I'm also interested in hearing about it.


Yeah, it's not gonna work. Mostly becasue the subfolder address is hardcoded in the blog address.

two things you can try:

  • make manual subdomains and pint the docroot for it at the wordpress install
  • use the domain mapping plugin to map subdomains to the subfolders. still gotta add each subdomain as a server alias to the same folder as wordpress.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜