---
title: "How to modify URL to strip out the pathname and set it to the address bar?"  
description: "How to modify URL to strip out the pathname and set it to the address bar?"  
author: "Anonymous User"  
published: 2015-02-05  
updated: 2015-02-05  
canonical: https://www.mindstick.com/forum/12948/how-to-modify-url-to-strip-out-the-pathname-and-set-it-to-the-address-bar  
category: "javascript"  
tags: ["c#", "asp.net"]  
reading_time: 1 minute  

---

# How to modify URL to strip out the pathname and set it to the address bar?

How to modify [URL](https://www.mindstick.com/forum/436/url-redirection) to strip out the pathname and set it to the [address bar](https://www.mindstick.com/forum/70/how-can-we-remove-address-bar-of-browser)

## Replies

### Reply by Anonymous User

You need to register routing in the global.asax file as per below:

```
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)    RegisterRoutes(Routing.RouteTable.Routes)End Sub Public Shared Sub RegisterRoutes(ByVal routeCollection As Routing.RouteCollection)    routeCollection.MapPageRoute("DefPage", "", "~/common/webpage/default.aspx")
```


---

Original Source: https://www.mindstick.com/forum/12948/how-to-modify-url-to-strip-out-the-pathname-and-set-it-to-the-address-bar

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
