Jetfire Posted December 29, 2008 Share Posted December 29, 2008 I was wondering if there was a way to modify the URL address after page load, so it doesn't show the user the real URL link to hide certain pages URL's. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/138789-modify-displayed-url-address-after-page-load/ Share on other sites More sharing options...
DarkWater Posted December 29, 2008 Share Posted December 29, 2008 No. Quote Link to comment https://forums.phpfreaks.com/topic/138789-modify-displayed-url-address-after-page-load/#findComment-725678 Share on other sites More sharing options...
Maq Posted December 29, 2008 Share Posted December 29, 2008 Not after the page load, but you can use mod_rewrite to alter the URI to keep certain things hidden... Quote Link to comment https://forums.phpfreaks.com/topic/138789-modify-displayed-url-address-after-page-load/#findComment-725680 Share on other sites More sharing options...
PFMaBiSmAd Posted December 29, 2008 Share Posted December 29, 2008 It would be much better if you told us what you are trying to accomplish so that someone could tell you the correct way of accomplishing it. Quote Link to comment https://forums.phpfreaks.com/topic/138789-modify-displayed-url-address-after-page-load/#findComment-725698 Share on other sites More sharing options...
Jetfire Posted December 29, 2008 Author Share Posted December 29, 2008 @Maq Could you show me please? Quote Link to comment https://forums.phpfreaks.com/topic/138789-modify-displayed-url-address-after-page-load/#findComment-725716 Share on other sites More sharing options...
Maq Posted December 29, 2008 Share Posted December 29, 2008 Sure, if you're using Apache go here. You'll find plenty of examples. I'm not exactly sure what you're trying to do, there may be an easier way. Anyway I hope this helps. Quote Link to comment https://forums.phpfreaks.com/topic/138789-modify-displayed-url-address-after-page-load/#findComment-725721 Share on other sites More sharing options...
RussellReal Posted December 29, 2008 Share Posted December 29, 2008 your web server MUST allow htaccess.. in your domain's home directory put a file called ".htaccess" inside of this file put something like.. RewriteEngine on RewriteRule ^whatever/lol$ file.php?name=whatever&extraInfo=lol that would redirect to file.php transparently meanwhile maintaining the original request URI in the address bar, there is way more complicated ways to use rewrites but that is an example.. Quote Link to comment https://forums.phpfreaks.com/topic/138789-modify-displayed-url-address-after-page-load/#findComment-725734 Share on other sites More sharing options...
DarkWater Posted December 29, 2008 Share Posted December 29, 2008 Still, that's not really "hiding" anything because they can just access that same content through the rewritten URI. Quote Link to comment https://forums.phpfreaks.com/topic/138789-modify-displayed-url-address-after-page-load/#findComment-725737 Share on other sites More sharing options...
RussellReal Posted December 29, 2008 Share Posted December 29, 2008 dark water is right but rly you can't show information without either FORCING DOWNLOAD (which sometimes when unexpected scares away users), or showing a relative path to the file.. you could, however, set up a ticketing system.. when when a user requests the file.. they get sent to a landing zone.. then the landing zone generattes a ticket associated with your IP, or denies them a ticket, depending on what criteria you want.. then when the user requests the file, remove him from the database, and then push him the data.. so that if the user gives out the url whatever.com/theFile.php?file=howdy.pdf if I took that from ur server if you require an active ticket.. if I gave that to my friend.. hed get denied because I don't have an active ticket.. its a form of security Quote Link to comment https://forums.phpfreaks.com/topic/138789-modify-displayed-url-address-after-page-load/#findComment-725759 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.