SirChick Posted September 18, 2007 Share Posted September 18, 2007 Is there a way to hide all urls like masking them so that instead of: www.name.com/code.php it'll be www.name.com similar to when you are on a flash website and the url remains the same but your going to many pages .. ? Reason i ask is i have like thousands of pages and i have a feature whereby if the user is locked they cannot access the pages until they are unlocked.. but to put a script on all of these pages would be the last case scenario, if i could remove the url showing the entire name, they can't know what to type into the url to avoid this locking feature... so is it possible? Quote Link to comment Share on other sites More sharing options...
hackerkts Posted September 18, 2007 Share Posted September 18, 2007 I have seen some pages like what you said before, I think they got around with javascript (if I'm not wrong), I'm not sure how but you can try to use mod rewrite to create a "fake" url. XD Quote Link to comment Share on other sites More sharing options...
SirChick Posted September 18, 2007 Author Share Posted September 18, 2007 well I dont need a fake url just need to only show main part of the url not the bits after it thatll avoid them trying to get out of the locking idea.. ill wait to see if any one else may be able to expand on your javascript idea Quote Link to comment Share on other sites More sharing options...
rondog Posted September 18, 2007 Share Posted September 18, 2007 I know exactly what you are talking about and I too would like to know how this is done! Quote Link to comment Share on other sites More sharing options...
freakstyle Posted September 18, 2007 Share Posted September 18, 2007 Hi there, you should look into mod rewriting, you'll need to capture the /code.php in order to serve up the correct page, and this is the way to go. here's a helpful tutorial to get you started: http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html * its a good idea to verify your server has the mod rewrite module installed. good luck to ya Quote Link to comment Share on other sites More sharing options...
SirChick Posted September 18, 2007 Author Share Posted September 18, 2007 php info showed: url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset= a=href,area=href,frame=src,input=src,form=,fieldset= which i assume means its on ? Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 18, 2007 Share Posted September 18, 2007 You must be checking to see if they are logged in on each page. Why not just add the check if they are locked into that function? Quote Link to comment Share on other sites More sharing options...
SirChick Posted September 18, 2007 Author Share Posted September 18, 2007 jesi.. i dont think i follow too well :S basically say a user gets locked a field in the table named "lockedid" is set to 1 and not 0.... then i have an if statement to make sure they go to that page. But users kept changing the url to any one of my pages and so were free to roam and im trying to find a way to stop this "without" putting if statements on 1000 odd php scripts Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 18, 2007 Share Posted September 18, 2007 How do you check if they are logged in or not? If they can view those pages when not logged in, you have a bigger problem. Instead of using if statements, write functions. Then when you edit that one function, it will affect all pages. Quote Link to comment Share on other sites More sharing options...
SirChick Posted September 18, 2007 Author Share Posted September 18, 2007 well i do a query like: find user with userid as session if row not found exit and error. i then tried doing the same for : check if locked == 1 ...{ header. locked.php}else{ codeee} and it causes a catastrophic server failure and my Xampp stops responding.. i can show u the code ? Quote Link to comment Share on other sites More sharing options...
SirChick Posted September 18, 2007 Author Share Posted September 18, 2007 This is what i got which does the you must be logged in script and the locked feature but its not working.. <? session_start(); //this block of code is called up with an include command on the html page that the user displays $connect = mysql_connect("localhost", "root", "private"); //error handle if (!$connect) { echo "Unable to connect to DataBase: " . mysql_error(); exit; } //error handle if (!mysql_select_db("civilian")) { echo "Unable to select Civilain: " . mysql_error(); exit; } // Start up the session if (!isset($_SESSION['Current_User']) || !$_SESSION['Current_User']) { die('You must be logged in to view this page'); } // Get the user's info from the database by putting // the user id stored in the session into the WHERE clause $GetUserID = mysql_query("SELECT * FROM userregistration WHERE UserID='{$_SESSION['Current_User']}'"); // Fetch the row from the database if (!($row = mysql_fetch_assoc($GetUserID))) { echo "User not found!"; exit; echo mysql_error(); } $Jail = $row["JailID"]; If ($Jail == 1) { Header ("Location: Londonjail.php"); } ?> Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 18, 2007 Share Posted September 18, 2007 What about it is not working? Quote Link to comment Share on other sites More sharing options...
blueman378 Posted September 19, 2007 Share Posted September 19, 2007 well there is one cheap way on your main page have a frame which is 100*100 and remove the frame border so and load your page in there and only www.url.com will show in the browser cheap but it works Quote Link to comment Share on other sites More sharing options...
d22552000 Posted September 19, 2007 Share Posted September 19, 2007 ya ive done that <framset 100%*100%> :D It is so awesome. Although if they right click the page and hit properties they will get the exact link of the page, unless you disable right clicking :D . I just have my site in a frame, then the frame opens up a window wiht no status bar and no file menus that has the site no way for them to get the url, then I disable right clicking in the new window. Now there is no way for them to pass through it lol. Quote Link to comment Share on other sites More sharing options...
blueman378 Posted September 19, 2007 Share Posted September 19, 2007 hehe yeah lol i found that out when i had a forum lol the link bla.com/cgi-bin/yabb/yabbfiles/yabb.pl really wasnt good lol Quote Link to comment Share on other sites More sharing options...
d22552000 Posted September 19, 2007 Share Posted September 19, 2007 I hate YA bb lol. Quote Link to comment Share on other sites More sharing options...
blueman378 Posted September 19, 2007 Share Posted September 19, 2007 haha lol y Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted September 19, 2007 Share Posted September 19, 2007 ya ive done that <framset 100%*100%> :D It is so awesome. Although if they right click the page and hit properties they will get the exact link of the page, unless you disable right clicking :D . I just have my site in a frame, then the frame opens up a window wiht no status bar and no file menus that has the site no way for them to get the url, then I disable right clicking in the new window. Now there is no way for them to pass through it lol. What if someone disables javasript? They could then view the source quite happily. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted September 19, 2007 Share Posted September 19, 2007 As far as the question is concered, i have to wonder why you have 1000 files. I assume this is some sort of game. Surely most of these files are very similar? Surely you could cut down no the number of files vastly with some variables? Quote Link to comment Share on other sites More sharing options...
d22552000 Posted September 19, 2007 Share Posted September 19, 2007 I have a backup to that, the site both uses a VB script and a JS script files. If they disable both it shows a warning. Quote Link to comment Share on other sites More sharing options...
SirChick Posted September 19, 2007 Author Share Posted September 19, 2007 the site is VERY large cos of the amount of stuff im coding... its a 2 year project of like 10 hours a day coding via a team. And yes it is a game.. and the site is cut down it was hitting 5000 odd but that was back in the days when we weren't so good at coding but we have learnt alot better methods since. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.