humanmade / Mercator

WordPress multisite domain mapping for the modern era.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mapped domain with admin on subdomain

aaroncampbell opened this issue · comments

Sorry for the more "support request" than "issue" here but I want to make sure I haven't just set things up wrong before I open issues for all the problems I'm having.

My goal was:
To have the main domain: aarondcampbell.com
With WordPress actually in aarondcampbell.com/wp
And Content in aarondcampbell.com/content
Then to have domains like geekreprieve.aarondcampbell.com. I want wp-admin for those sites to be at geekreprieve.aarondcampbell.com/wp-admin or geekreprieve.aarondcampbell.com/wp/wp-admin (don't really care which), but I want the front end to be mapped and at something like geekreprieve.com (including things like the URLs used when inserting media into posts, etc).

Right now the subsites are set with:
Siteurl: http://geekreprieve.aarondcampbell.com/wp/
Home: http://geekreprieve.aarondcampbell.com/
Alias: geekreprieve.com

The admin for subsites seems functional at the expected location (http://geekreprieve.aarondcampbell.com/wp/wp-admin/) but also seems to work at the mapped location (not preferred). The front end works at the expected location (geekreprieve.com) but also works at geekreprieve.aarondcampbell.com (which I didn't expect). All media though is also inserted as geekreprieve.aarondcampbell.com/content

I wrote some code that filters upload_url to fix the media stuff, but I'm not sure if I should work it into a patch or, like I said, if I'm just doing something wrong.

Hi @aaroncampbell!

By default Mercator is creating an alias for the subsite. Anything you can do on the original (use wp-admin, see the front-end) you can do on the alias. Whichever you're using to insert embedded media into a post will use that site's URL format (e.g. if I'm adding media to a post on alias.com it will insert it as alias.com/uploads/img.jpg)

I had similar questions and updated the readme a while ago to try to clear this up.

I'm going to close this issue, as the software is working as expected. However, I sense that some of your expectations of how Mercator should work are feature requests (e.g. only allow access to wp-admin over one of the domains). Please open specific issues for any feature you would like to see in Mercator so we can divide discussion and conquer 😄