faustjs
faustjs copied to clipboard
Bug: Redirect Feature does not work when WP instalations is just on a different path to NextJS.
When I use the feature in the FaustJS WP Plugin Enable public route redirects I dont get the correct redirection.
My home_url is -> https://cms/wp My NextJS route is -> https://cms
Debuging I found that
// faustwp/includes/deny-public-access/callbacks.php
$request_uri = home_url( add_query_arg( null, null ) );
I test with
return this -> https://cms/wp/wp/my_blog_path instead of -> https://cms/wp/my_blog_path
Applicable Versions
- WordPress version: 6.2
- Faust WP Plugin : 0.8.6
Steps To Reproduce
- Create a Wordpress instalation over the same domain that NextJS but in a different path. for example: Wordpress instalation url : https://example.com/wp NextJS instalation url : https://example.com
- on Faust WP plugin Enable 'Enable public route redirects'
- Go to https://example.com/wp/sample-page
The current behavior
Redirect Loop on browser
The expected behavior
Redirect to https://example.com/sample-page
I test with
// faustwp/includes/deny-public-access/callbacks.php
global $wp
$request_uri = home_url( add_query_arg( $_GET, $wp->request) );
And redirect work like I expected, but I dont meet all test cases.