hello, please anybody tell me how to disable access to specific url my urls look like this http://domain.com/folder/?d=folder/subfolder&c=6 im using an simple load auto index script. i want to disable access for some urls
how to disable access for a specific url?
Started on the old forum in February 2015 · view the original in the archive · old links redirect here
without seeing the source code of your script its impossible to provide a proper solution,
a very simple solution would be:
if(stristr($_GET['d'],'folder/subfolder'))exit();
Advertise your mobile site for FREE with AdTwirl
lovebirds143 wrote: hello, please anybody tell me how to disable access to specific url my urls look like this http://domain.com/folder/?d=folder/subfolder&c=6 im using an simple load auto index script. i want to disable access for some urls
you can use base64_decode and encode in your $_GET =)
for example you fetch ?file=blablabla
<?php
if(isset($_GET['file']))
{
$encoded = base64_decode($_GET['file']);
}
else
{
$encoded ="";
}
?>
your link should be like this
<?php
$tofetch = "blablabla";
echo "<a href="".base64_encode($tofetch)."">TEST ENCODED HERE</a>";
?>
this should work =) cannot be readable by bare eyes but can easily be understand.. it will looks like a random strings but it is encoded
try to understand and you'll get it 🙂
External image (may be gone) http://wapx.amob.com Applications, Games, Wallpapers, Ringtones, Videos, Themes, Screensaver and More!!!
mod rewrite?
RewriteEngine On
RewriteRule ^/url/you/want/to/hide.html$ index.html [L]
simiiar to gumslones solution but with protection and a redirect this is what i do add this code to top of file:
/** Prevent direct access from url to file that holds this code
change db.php to name of fie you add this code into */
if(stristr(htmlentities($_SERVER['SCRIPT_NAME']), 'db.php')){
echo '<meta http-equiv="Refresh" content="0; url=index.php">';
die();
}