how to remove the particular string from the url and update it : <p>I want to remove the string from the url and update as it after the removal.</p>

<p>example: <code>www.abc.com/xyz</code></p>

<p>I need to remove xyz and update it as <code>www.abc.com</code></p>

<p>Thank you</p>
