0

My client has a Wordpress site which uses custom routing such that it is accessible at:

https://www.website.com

Even though the WP URLs are set to:

https://wp.website.com

They need to the routing to be this way. And it works OK.

The problem is that the outputted HTML references https://wp.website.com which is bad for SEO (OG URL, Canonical URL, asset paths etc)

We've tried setting the 2 different URLS as "Wordpress Address (URL)" and "Site Address(URL)" but lots of things broke. It went very badly.

So I'm wondering, does WP have a simple HTML output filter I can use to search/replace the URL base? Or maybe do it with HTACCESS somehow?

Any help would be appreciated.

CJ

CJWEB
  • 581
  • 6
  • 13
  • No, that is only for page content, it doesn't include the header and footer HTML unfortunately. – CJWEB Nov 10 '20 at 04:26
  • 1
    Where and when you start the output buffering, is more or less up to you. – CBroe Nov 10 '20 at 07:14
  • Thanks @CBroe, I really appreciate you finding that for me! Looks like it will solve the problem! – CJWEB Nov 10 '20 at 23:48

0 Answers0