[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 660
  • Last Modified:

hiding exact url

How is it possible to hide your complete url as someone navigates your website.
I want people to be able to navigate my site and not see in the address bar what page exactly they are on, i just want them to see the site url.

Cheers,
Raftor.
0
Raftor
Asked:
Raftor
2 Solutions
 
BatalfCommented:
You have to use frameset for that. That will show index.html or just the domain when you navigate.

But it's not recommended.

What if a user finds a page on your site very interesting and wants to add it to his/her favourites? Then they won't be able to it since it's not the page on the address line.

Batalf
0
 
rdivilbissCommented:
Why do you wish to hide the page?
0
 
bloodredsunCommented:
you could use a Controller pattern where your users access just one page but the page forwards to the correct page internally.

e.g.

controller.jsp?action=help  //would forward to help.jsp
controller.jsp?action=contactus  //would forward to contactus.jsp

This is one of the "Presentation Patterns" in web development and is central to Struts and other MVC framework.

But to be honest, asking to hid your URL is like asking how to hide your HTML, practically impossible to anyone with a modicum of knowledge.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
TagorCommented:
You could also use a popup and hide the address bar.
0
 
Ted BouskillSenior Software DeveloperCommented:
I've answered this for a similar problem.  With .NET there is a function called Server.Transfer()  It's not a redirect but it works like one.  For example, your Default.aspx page Load event on http://www.mydomain.com could use Server.Transfer("http://www.mydomain.com/hidden.aspx") but the URL listed in IE would be http://www.mydomain.com.

Normally a redirect has to round trip to the client browser.  However, Server.Transfer() redirects at the server before sending the response to the client.
0
 
DanielcmorrisCommented:
I use tedbilly's method.  I used to use frames to do it, but there are some issues with frames that I won't get into.  A popup is a great way, our library does that, but it can get messy.

What Batalf mentioned about people wanting to bookmark your page is also importatant.

You can compromise a bit.  Us directories to create categories of items.  Have your pages in there start with default.aspx and use the server.transfer to hit all the other pages in that directory.  This way the user will see the URL and the directory, but not a webpage.  If they bookmark it, it will lead them to the default page for that directory, where you'd want them to start anyway.

That's what I do anyway.

-d
0
 
Samer ChidiacCommented:
tedbilly's method is very valid ..

if you don't want to use it .. pay a little time and use the <iframe>  it has  a SRC propertie that will fetch an entire website into it.. you can simply do a www.mydomain.com/index.asp?p=1 and change the value or the SRC depending on the querystring ( the P value)

cheers,

SC


------------------
Samer Chidiac
Microsoft MVP - ASP/ASP.net
0
 
DanielcmorrisCommented:
Along the same lines as chidioc, I use Includes rather than IFRAME, based upon the same type of criteria (p=1 or p=2, etc...)

in .Net you can do this

 <%@ Page Language="vb" AutoEventWireup="false"%>
   <html>
   <body>
        <%
          Response.WriteFile ("Yourfile.inc")
        %>
   </body>
   </html>
      
using the criteera you can

 <%@ Page Language="vb" AutoEventWireup="false"%>
   <html>
   <body>
        <%
if p=1 then
          Response.WriteFile ("Yourfile.inc")
else
          Response.WriteFile("YourOtherFile.inc")
end if

        %>
   </body>
   </html>
      

http://support.microsoft.com/default.aspx?scid=kb;en-us;306575

-------------------------------
Now.... I have to say, I don't use this anymore.  I would seriously consider using the Server.Transfer method within visible directories.  It really makes it easer to deal with when you have to move things around, espesially if you want to break up the job amongst more than one employees  (locking out newer employees from more sensitive regions)

-dan
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now