开发者

Htaccess Sub-Directory showing Wordpress on Sub-domain

So here is a little test for you guys:

There is a Wordpress blog installed at sub.domain.com

There is a website at somewebsite.com

Can anyone come up with a way to use .htaccess so that the following is possible:

  • You can use the wordpress blog like it is located at somewebsite.com/blog/
  • The wp-admin is accessible through sub.domain.com/wp-admin or somewebsite.com/blog/wp-admin/
  • No major changes need to be made to the Wordpress install or templates.

Looking forward to 开发者_开发百科seeing what you come up with.


The .htaccess rewrites would be pretty straightforward (just need some regex), but the problem you'll run into is within WordPress itself. It really doesn't like when you pass it requests it's not really expecting. In response, it just redirects you to its best guess as to where you were trying to go.

Even using one of the handful of plugins available for multiple-domain mapping, you still need to assign each blog one primary domain. The others just redirect there.

So your options are to either (1) have one redirect to the other or (2) have two separate blogs served by the same installation of WordPress. If you want one to redirect to the other, which would you prefer be the primary?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜