How to protect viewing module position on live site

Written byParvez Akther

You have a custom made Joomla! template and you want to hide your module position from visitor? If you have Joomla! site you can easily see your module position and template layout from browser just going this URL www.YourSiteURL.com/index.php?tp=1

Your see all your module position is unveiled! Now you don't want to show this page to your visitor, what to do?

A very simple nifty trick, Just put this code to your template's index.php file and its done!

if($_REQUEST['tp']==1)
    {
        header("Location: http://www.YourDesiredURL.com/");
    }

Now what this code mean for?

If you put "tp=1" in your url this code will execute and re-direct you to your desire url! Extremely easy nah?

Related items (by tag)

1 Comment

  • Comment Link Sunrize Friday, 09 April 2010 10:21 posted by Sunrize

    That's a neat trick! but my main question is, what are the consequences of people viewing my template layout? is this a hacking issue? or security? or just a way of not showing your module?

    This e-mail address is being protected from spambots. You need JavaScript enabled to view it

Add comment