I hope you all are doing well and staying safe during these times.
I was wondering if someone can help me figure out how to remove the question mark (?) in the URL.
The URL I am trying to rewrite looks like this: /?download
The URL I'd like to have:
That's the code I have tried but didn't work, I get an Internal Server Error
add_action( 'init', 'wpa5413_init' );
function wpa5413_init()
{
add_rewrite_rule(
'windows/([^/]+)/?/?download',
'windows/$matches[1]/download',
'top' );
}
Please let me know what you think?