We covered how to show your published module positions using ?tp=1 in a previous post.
Now, a few weeks have passed and for some reason you are hyper paranoid and want to know how to hide it. My first thought is to tell you that there are far more important things to be worrying about, but to each his own. *shrugs*
The easiest way is to add this to your Joomla .htaccess file.
##### Start ?tp=1 prevention ######
RewriteCond %{QUERY_STRING} tp=(.*)
RewriteRule ^(.*)$ index.php [F,L]
##### End ?tp=1 prevention ######
You may need to change it from htaccess.txt to .htaccess first. If your site goes down after changing the file name or has odd behaviors it’s time for you to do some reading on what .htaccess is and how to use it. This article has a lot of good info on the file and it’s proper usage.
I have heard about the previous method not working well for everybody in all situations. Maybe you don’t want to use SEO urls. Maybe you don’t want to read about htaccess and it’s proper usage. You can always use this plugin on Joomla.org. I have no personal experience with it, but it seems pretty straight forward.
A third alternative is to do a core hack.
Go to /libraries/joomla/application/module/helper.php and look around line 200 for this code.
//dynamically add outline style
if(JRequest::getBool('tp')) {
$attribs['style'] .= ' outline';
}
Comment out the 3rd line out with //
//dynamically add outline style
if(JRequest::getBool('tp')) {
//$attribs['style'] .= ' outline';
}
Keep in mind this is a core hack. If you upgrade or patch your Joomla install, this hack will get deleted.
Finally, if all this code confuses you or is a hassle, you might want to try out Morph from JoomlaJunkie. This feature, as well as hundreds of other tweaks are built right into it.













8 Comments on "How to disable ?tp=1 in Joomla"
Thanks, it works!!
=D
.-= Andrew´s last blog ..Teste =-.
Hi
Is the htaccess modification compatible with sef url’s?
Thanks and regards
Thanks a lot ….
What about the security option in joomla sites?
Trackbacks for this post