I developed an PHP application (WAMPserver) which will run on a company's internal server, and I want to hide/remove the URLs shown in the browser's address bar.
That would display the rap_calendar.php script, and you
would use .htaccess to hide the ?p=2 part.
Basically, you're building a template to display all pages using "index.php".
Not really. As mlseim says, using index means that it can be invisble in the address bar as the server will automatically look for an index file itself.
All you need to do is use index.php and then include your normal file - as msleim says above. It's literally like this:
PHP Code:
include('usual-file.php');
Thats it. Any $_POST, $_GET, $_SERVER etc will still be available to your included file.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.
And you should be using one script for all pages (index.php) ...
because it would allow you to display any information from
your database without creating a new page for each category (or whatever).
What is your site about? And if it's what you gave in post #1, it looks like
you already have a database, and lots of information.
And you should be using one script for all pages (index.php) ...
because it would allow you to display any information from
your database without creating a new page for each category (or whatever).
This is exactly how I also write code. Everything goes through index.php where the request is then broken down and analyzed before being put through to other code via included files. I never use seperate files for main code as it becomes too confusing to update them all and remember to check/set variables etc.
All you need is a mode value in the url to tell the script which file to include (eg ?mode=login would include login.php). Job done.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.
Why exactly are you wanting to do this? Generally speaking there are very few reasons to obfuscate the URL the user is at. It can make it hard or impossible to bookmark pages or send people links. And depending on the implementation the browser's back and next buttons won't function properly.
Based on the response in your other thread it sounds like you think it isn't as clean or something to have the actual URL. You can do some rewriting but making the URL constant the entire time is just annoying for users due to the problems I listed above.
Hiding the URL doesn't make your application any more secure or more professional looking.
I see you are an `OracleGuy`, so I give you this example. An Oracle Web-based application (see atachement) has the same address bar display no matter what module / form / report the user is in (http://aplic.compania.es:8889/forms90/f90servlet?...).
I want my PHP Web-based application to run the same way.
I'm sure this can be done, but I don't know how.
I need advice from some of your PHP developers members with application experience.
I posted a similar thread on the Apache configuration section, because I feel this can be done at server level.
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value.