i have wordpress site hosted on azure app service (not dedicated vm) , need people access front page via url like: http://www.example.com/?tracking.id=12345
however, wordpress re-writing url replacing dot in tracking.id
underscore: http://www.example.com/?tracking_id=12345
how can prevent wordpress doing this?
what's interesting happens on home page, query vars stay intact everywhere else. might able figure out what's going on if take @ wp-includes/canonical.php
(that's redirect_canonical
filter located)
function prevent_underscores( $redirect_url, $requested_url ) { if( isset( $_get['tracking_id'] ) ) { return $requested_url; } return $redirect_url; } add_filter( 'redirect_canonical', 'prevent_underscores', 10, 2 );
Comments
Post a Comment