How do i hide the url in the address bar in html?

I want to keep same url for all the pages of my site.

ex: if my site is www.abc.com & xyz.html is a page.

I want to display www.abc.com or www.abc.com/xyz instead of www.abc.com/xyz.htm

Please help me to do this.

Thank you in advance.

asked Aug 19, 2015 at 10:18

How do i hide the url in the address bar in html?

You can use javascript for that , for example

 

You can read more about here :

Explanation

Or use a PHP Routing system, theres a lot of information about it in google

answered Aug 19, 2015 at 10:30

How do i hide the url in the address bar in html?

Carlos DelgadoCarlos Delgado

2,8504 gold badges22 silver badges48 bronze badges

Use this snippets in your .htaccess file

Now you can use this in Url abc.com/xyz and it redirect you to abc.com/xyz.php

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]    {1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]

answered Jan 2, 2017 at 2:55

How do i hide the url in the address bar in html?

  • Remove From My Forums

  • Question

  • User-400071421 posted

    HI,

    All.

    I wants to hide my actual url in address bar.I have site in this site i provide support to my user and also to my user's end user.

    Now i wants to hide actual url to end user of my user.

    I have one solution that is by using iframe and it works fine.

    Now anyone has any other solution than iframe then replay me...

    Thanks

Answers

  • User1006193418 posted

    Hi sunilbotadara,

    From your description, I understand that you would like to hide the URL in Location bar of the browser and have another solution instead of using iFrame for this. If I have misunderstood, please feel free to let me know[:)].

    I suggest we input some JavaScript codes into the HTML page like this:  

    <script language='javascript'> 
        if(window.opener==null)
        { 
            window.opener=null; 
            window.close(); 
            window.open('default.aspx','','toolbar=no,menubar=no,location=no,status=no'); 
        } 
    script>

    Please understand that this will hide both Location bar and Status bar of the browser, so that the user will be not able to find the address of the page.

    Best Regards,
    Shengqing Yang 

    • Marked as answer by Thursday, October 7, 2021 12:00 AM

  • User-1034726716 posted

    Try using URL Rewriting... 

    http://somenewkid.blogspot.com/2006/05/charlie-has-cool-urls-part-1.html
    http://msdn.microsoft.com/en-us/library/ms972974.aspx
    http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM

  • User-1443539674 posted

     Better yet,

    try using Server.Transfer instead of Response.Redirect in your code and see what happens! 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM

For one reason or another, you may want to hide the URL displayed in the browser window’s status bar when a user mouses over it.

The URL can be easily hidden by using some simple HTML and JavaScript with a few basic techniques.

Hiding the URL With HTML and JavaScript using Void(0)

This code will display some JavaScript code in the status bar instead of the URL and will still work as a normal link when clicked.

Mousing over this URL will display "void(0)" in the browser's status bar.

Code Demo:

Mousing over this URL will display “void(0)” in the browser’s status bar.

Hiding the URL in the Browser Status Bar with the Pound Symbol

Note: This technique is a little bit deceptive, and using it should be avoided.

The URL displayed in the status bar will appear to be the current URL followed by the pound (#) symbol, but when the user clicks it, they will be taken to whatever URL is specified in the JavaScript.

Mousing over this URL will display the current URL followed by a pound symbol.

Code Demo:

Mousing over this URL will display the current URL followed by a pound symbol.

The Old Techniques Using window.status

There used to be a more eloquent way to achieve this by using window.status, but most major web browsers have long disabled the ability to hide the URL in the status bar this way due to security problems.

Web developers could set the status bar text to anything they wanted at any time, but this was problematic because people could be misled into thinking that they were clicking on a link to one site but were being taken to a different site.

How can I hide the URL in the address bar?

To get started enter “about:flags” into the Address Bar and hit Enter. Scroll down until you see the listing for Compact Navigation. Enable it and let the browser restart to gain access to the feature. Once the browser has restarted right click on one of the tabs and select Hide the toolbar from the Context Menu.

How do I hide URL address in HTML?

By changing the display feature to "none", you will remove the link from the page layout. This may cause other elements of your page to move if they define their position in reference to your link. Changing your visibility to "hidden" will hide the link without influencing the page layout.

How can I hide the actual URL in the status bar of all browsers?

Hiding the URL With HTML and JavaScript using Void(0) This code will display some JavaScript code in the status bar instead of the URL and will still work as a normal link when clicked. Code Demo: Mousing over this URL will display “void(0)” in the browser's status bar.