Redirect sub-pages to parent without changing URL
No, you are on the right track as far as the add_rewrite_rule function is concerned. The generated rewrite rule doesn’t send a 303 header. The problem, in this case, is with your code which can be fixed easily. On this line: add_rewrite_rule(‘^recommendations\/(.*)\/?’, ‘recommendations/’, ‘top’); you are making WordPress to output a modified, custom .htaccess file … Read more