Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
48 views
ago in Q2A Core by
Google search console error when upgrading to 1.8.8.
Q2A version: Latest

1 Answer

0 votes
ago by
selected ago by
 
Best answer

My Solution:

add this code in the end of current theme qa-theme.php file:
//To modify the URL pattern (i.e., change the + in the URL to %20 for space) in PHP
// Get the current request URI
$requestUri = $_SERVER['REQUEST_URI'];
// Check if the URL contains '+' and replace with '%20'
if (strpos($requestUri, '+') !== false) {
    // Replace '+' with '%20'
    $modifiedUri = str_replace('+', '%20', $requestUri);
    // Redirect to the modified URI
    header("Location: $modifiedUri", true, 301);
    exit;
}
...