how to remove folder structure from being displayed

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Tokunbo
Forum Commoner
Posts: 46
Joined: Thu Sep 29, 2011 8:53 am

how to remove folder structure from being displayed

Post by Tokunbo »

hello sirs,

For ex: I have an application and Im planning to restrict access to the individual files in individual DIRs under the main DIR. For this I would use .htaccess as per info found on google.

What I want to ask is: can I also remove the path from being displayed as the user navigates around?

For ex: as a user navigates around the program, I would want something like this below to be constantly displayed:
http://blahblahblah.com/index.php

instead of
http://blahblahblah.com/dir1/dir2/dir3/fileX.php or
http://blahblahblah.com/dir1/dir2/fileY.php or
http://blahblahblah.com/dir1/dir2/fileX

regardless of where the user navigates into, in the program.

regards
Toks
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: how to remove folder structure from being displayed

Post by requinix »

That is not easy and generally you shouldn't do it. Why are you concerned about the users seeing the full URL? Even if you could "hide" it (which you can in only a loose sense of the word) a motivated user could still see what it was with just a small amount of work.
Post Reply