Current post ID – relative url

Go to Settings -> Permalink and select Custom Structure.

Enter /?post_id=%postname% or /?p=%postname% in input then save changes.