doushengyou2617 2016-12-15 07:21
浏览 55

重定向WordPress页面而不更改URL或执行301

I have a URL like https://mydomain/pages/123_share but the corresponding WordPress page would be https://mydomain/pages/123/

How can I do this using .htaccess, WordPress wp-engine, etc.? Here, the problem is I cannot use 301 redirect. I need the content of that page served. That means whenever I type the first URL, I need to give the content of the second URL without passing additional HTTP headers or changing the URL.

How can I do that?
Thanks in advance.

  • 写回答

1条回答 默认 最新

  • dounei5721 2016-12-15 12:23
    关注

    If you have mod_proxy enabled you just use the same kind of rule as you would for an external redirect, but proxy it:

     RewriteRule ^pages/123_share$ https://mydomain/pages/123/ [NS,P]
    

    The page should should have a <link rel=canonical … for SEO.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog