Link to home
Start Free TrialLog in
Avatar of elguindy
elguindy

asked on

Hide page URL in Browser address bar

Hi all experts,
I want a solution that can help me in one of the following:

how to hide the URL of a page in a folder in my website like (www.mysite.com/mypage.html)
I want to hide this address from useres to not to know the page URL
Thanks
Avatar of garreH
garreH

You cannot hide urls. Instead, you can give access permissions to folders and files on your site. To do this refer to this tutorial for use of the .htaccess file: http://www.javascriptkit.com/howto/htaccess.shtml (for apache)
Also if you want to actually hide the url in the address bar - This technique is called 'Phishing' (http://www.fraudwatchinternational.com/internet/phishing/website.shtml) - I shall not describe how to do this as it is normally used for malicious activies.

garreh :)
Avatar of Deepak Vasudevan
garreH,

Not always. Hiding an URL is always not malicious. Sometimes you have a personal website with a provider with long long names like http://www.freewebhostingprovider.com/members/free/homepages/garreh/ and there are freebie service providers like CJB.NET, Dot.TK, who offer a friendly short subdomain like garreh.tk or garreh.cjb.net which can redirect.

Basically what they do is put a small FRAMESET with 0%, 100% frames. 0% frames is about:blank and 100% frames is your homepage URL.

Now the user will be having the flexibility of a shorter URL.

Check out this implementation of URL Cloaking also: http://www.thecodeproject.com/aspnet/urlcloaking.asp

But the author is intending to hide the page Name, which is also known as URLRewriting. There are a lot of MSDN Sample Implementations on URL Rewriting.

http://www.codeproject.com/aspnet/URLRewriter.asp
you can Hide page url in your brower by using "FRAME" by in address bar will show only main frame and you can select or do anything in your target frame

<FRAMESET ROWS="," COLS=",">
      <FRAME SRC="" NAME="" target="">
      <FRAME SRC="" NAME="" target="">
</FRAMESET>
Avatar of elguindy

ASKER

Thanks for all especially deepaknet
But I really cann't use frames and I can't use ASP.Net.
I'm working on PHP on Apache Server,
And I really looking to hide the page name same as deepaknet describe but with PHP code that can implemented into htm or even by Apache .htaccess code.
The normal page is www.mysite.com/success.html I want to hide the name of success.html or even change it's name that show to the users
Thanks alot and waiting for your help


Well I'm assuming you wish to hide the URL because of security. And if its a private URL that you do not want certain people to access then use the .htaccess file (tutorial link given above) - and create some kind of login system.

I could not see any other reason to 'hide a url' - with the exception of malicious phishing activites

garreh
Okay didn't read deepaknet post before my last post. Although I can understand the reason of wanting to mask a url because 'its shorter' - I don't undestand the princible of wanting to hide a url. It seems pointless :)

garreh
I tell you what the reason I want to hide
I've an exam online for poeple to take and then when the exam finish it redirect them to URL
www.mysite.com/success.html
this page will send me mail that this guy has passed the exam
So if they know the page name, it'll be easy to write in in the browser and pass the exam without taking it, that's why I want to hide the page name
Please waiting for your help
elguindy if you simply hide the url your exam system will easily be compromised. I think you are going about this the wrong way. You need to have a system where if a user accesses success.html but has not passed the exam then it will display a forbidden page error. You can do this with PHP with sessions, for example. Its silly to be hiding urls. :)

garreh
Ok, tell me how we agree and I know it's silly but I don't have time to make full system with PHP,
so we return the problem to naother point and update the question

HOW CAN I PROTECT THE SUCESS PAGE with SESSION IN PHP  and keep in mind that the student will get user name and password to acess the exam via .htacess password technique, so I cn't make session
If you can tell me how can I protect this success page to be viewed in session with php I'll appreciate that and I'll grant you the 500 points
thanks in advance
How are you currently working with the .htaccess file?
ASKER CERTIFIED SOLUTION
Avatar of garreH
garreH

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial