Home  >  Q&A  >  body text

python - 二级目录如何直接关联到顶级域名?

问题:

我朋友一个网站的权重很高:www.baidu.com,他给我开了二级目录,可以让我在里面放内容,www.baidu.com/a/,这样形式的二级目录...但是出于安全,他只能让我放静态页面,但是这样非常不方便,我要每次生成页面,然后再解压,再到他那边上传...我现在想,有没有可能这样的方式来实现:

我一个django项目,绑定在另外的服务器上,然后访问他的二级目录www.baidu.com/a/,对应访问的内容是我的django??而这2个站是在不同服务器上的.

特别说明:

js,跳转之类的暂时还是不考虑,因为我本身要要继承他网站的权重所以才放在他的二级目录下的,有没有无缝对接的方案?

PHPzPHPz2713 days ago411

reply all(3)I'll reply

  • 天蓬老师

    天蓬老师2017-04-18 09:38:10

    Configure a proxy rule in nginx, proxypass.
    However, this method has a disadvantage, that is, all requests must be redirected through its server, and the access speed is slower.

    reply
    0
  • PHPz

    PHPz2017-04-18 09:38:10

    I understand that you have a URL, but you just want to use your friend’s weight to have your friend’s secondary directory jump to your URL. I just want to know briefly about SEO. Can I inherit the weight by using redirection on your friend’s server?

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-18 09:38:10

    It doesn’t have to be a physical secondary directory, right? It seems that as long as your URL is www.baidu.com/a/, it will be fine. Can nginx be configured with /a/ and jump to your server?

    reply
    0
  • Cancelreply