Joomla Install
Secure your standalone scripts used in a Joomla site
Main Menu
| Home |
| Joomla Install |
| Administration |
| Joomla Components |
| Joomla Modules |
| Joomla Bots |
| Joomla SEO |
| Hacks |
|
|
|
| Secure your standalone scripts used in a Joomla site |
|
|
|
|
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> Joomla has everything you may need. Right? If you take a look to the Joomla Extensions site, you may agree with this. But, as allways, there may be cases, when the above statement is wrong. For specific need he simplest approach may be to use for specific purposes a standalone script. You can solve the problem - apparently - by using Joomla's wrapper feature, and use your scripts as they where part of your Joomla site. Allmost perfect solution you may think... but your scripts are directly accessible by their phisical URL, not only through the Joomla interface. What you can do about? A lot. And surprisingly easily. If you Google around, you will find allmost instantly a .htaccess code, wich, for couple of reasons won't work in your Joomla install. But the solution is allmost there, you need only to modify slightly the code you find this way. The tip below is tried for Joomla 1.0.15, but probably will work withouth a hitch in any version (including Joomla 1.5.* versions). Let’s say:
So the easy solution, is to put a .htaccess file inside your /scripts folder to block direct access to the folder or the scripts. In the same time sure that use as title of your wrapper something different from the real script URL! Your htaccess file should contain:
This will actually block any access if the URL contains …scripts… This will work, because Joomla’s wrapper doesn’t tell you the directory name, but instead is using the Wrapper title that you specified on the Administration. So as long as you don’t put in the same name as the script folder, this will work. Instructions:
plugin by VivoCiti.com
|
| < Prev | Next > |
|---|
|
|
|













