简体   繁体   English

从 URL 中删除/隐藏子目录

[英]Remove/hide subdirectory from URL

Currently www.brand-a.com and www.brand-b.com both point to the root folder containing a HTML landing page directing users to either /siteA or /siteB both of which contain an installation of WordPress containing the content relevant to each brand. Currently www.brand-a.com and www.brand-b.com both point to the root folder containing a HTML landing page directing users to either /siteA or /siteB siteB both of which contain an installation of WordPress containing the content relevant to each牌。

- root
  |- index.html (landing page)
  |- /siteA/
    |- WordPress
  |- /siteB/
    |- WordPress

The landing page (index.html) is currently accessible from either brand-a.com or brand-b.com with the main sites are being accessible from brand-a.com/siteA and brand-b.com/siteB登录页面 (index.html) 目前可从brand-a.com or brand-b.com访问,主要站点可从品牌brand-a.com/siteA和品牌brand-b.com/siteB访问

Given the current set up is it possible to remove/hide the subdirectories /siteA and /siteB from the URL via .htaccess or would this just redirect everything back to the landing page?鉴于当前的设置,是否可以通过 .htaccess 从 URL 中删除/隐藏子目录/siteA/siteB siteB,或者这只是将所有内容重定向回登录页面?

Would it be best to have a third domain to act as a bridge between the two brands?最好有第三个域作为两个品牌之间的桥梁吗?

For example例如

www.brand-bridge.com -> /index.html (landing page)
www.brand-a.com -> /siteA/
www.brand-b.com -> /siteB/

This would keep each area separate and allow the domains to point directly at their respective content.这将使每个区域保持独立,并允许域直接指向它们各自的内容。

Ultimately just trying to determine if this is even possible and what my options are, if you require any further information please let me know and I'll answer as best I can.最终只是想确定这是否可能以及我的选择是什么,如果您需要任何进一步的信息,请告诉我,我会尽我所能回答。

Thanks谢谢

Edit: The client as requested both www.brand-a.com and www.brand-b.com go to the landing page giving the user the option which site they would like to access regardless of which URL is used. Edit: The client as requested both www.brand-a.com and www.brand-b.com go to the landing page giving the user the option which site they would like to access regardless of which URL is used.

/* you can use any domain mapping plugin or redirection plugin for both site and redirect to original domain */ /* 您可以为站点使用任何域映射插件或重定向插件并重定向到原始域 */

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM