Page 1 of 1
hide the scripts name from the url bar
Posted: Thu Jan 13, 2005 9:00 am
by mcog_esteban
hi all...
how can i hide the scripts name in the url bar?
i'm not using frames.
thanks
Posted: Thu Jan 13, 2005 9:37 am
by feyd
there's
mod_rewrite, along with interfacing scripts that take a control from the url to tell it which file to include. Note: do not use the filename/path as a control.
Code: Select all
<?php
$controls = array('jane'=>'data/jane.php', 'foo'=>'bar.php',);
if( !isset( $_GETї'control'] ) || !isset( $controlsїstrtolower($_GETї'control'])] )
$control = 'jane'; // default action
else
$control = $_GETї'control'];
$control = $controlsї$control];
include($control);
use an htaccess file, or equivalent, to lock out external access to the "data" folder, if you use one, in case someone tries to guesses the path..

Posted: Thu Jan 13, 2005 1:11 pm
by mcog_esteban
thanks feyd.
i thought that was some more intrinsic solution.