Knowledgebase

Portal Home > Knowledgebase > Articles Database > Restrict direct access


Restrict direct access




Posted by ServerXY, 07-15-2012, 04:18 PM
Hello, I dont know it is stupid question but i search all around the google and some forums but i did not get my solution.. I am actually using iframe in joomla there i have given path of my script/index.php file... Now i want to restrict direct access of /script/index.php file and want to allow only in iframe second thing is it should only embed in the same domain if someone try to add my script in their iframe it forbidden how is that possible? any champion out there?

Posted by cselzer, 07-15-2012, 06:05 PM
Hello, There really wouldn't be a way to do this really. The reason is because even if you are opening it through an iframe, you're still opening it through the /script/index.php in a new "frame" which would be the iframe, you would need to write code to establish that it is being retrieved through the iframe and not direct link. You can try the "hotlinking" technique. Normally, you're unable to direct link to an image that is under hotlink protection, but the domain name should be able to retrieve them. I've never tried this, but what you're asking to do, doesn't really make any sense really. Can you tell us why you're wanting to do this? With this method, google will not be able to crawl this website at all.

Posted by ServerXY, 07-15-2012, 06:10 PM
Hello cselzer, Actually the problem is i have made a religion website on joomla, and there i wanted to upload alot of mp3 albums and i did not fine good way in joomla to auto index mp3 from path and play download option. There is mp3 browser plugin available but it is not good so i used an third party free php script and make it fully simple and added that script in my joomla through iframe wrapper with auto height so page is working very fine in joomla just dont want anyone to check iframe source and open it directly thats why or u suggest me what to do?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Ram Problem (Views: 539)


Language:

Contact us