Support

Admin Tools

#12570 Some Help on the .htaccess maker

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Wednesday, 06 June 2012 09:19 CDT

atg1967
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? Yes
Have I searched the tickets before posting? Yes
Have I read the documentation before posting (which pages?)? No
Joomla! version: 1.5.26
PHP version: 5.2.17
MySQL version: 5.0.95-community
Host: buyhttp.com
Admin Tools version: 2.26

Description of my issue:

Hello there Nicolas,

I had the pleasure to see you at Joomla Greece, i just wanted to ask you this,

I have purchased Admin Tools and i have installed it on a test website i am working on. Regarding to the .htaccess maker i have added a couple of lines in the custom section. These are the lines i have added:

##### Custom Rules (Top of File) -- BEGIN
RewriteCond %{QUERY_STRING} (&|%3F){1,1}tp= [OR]
RewriteCond %{QUERY_STRING} (&|%3F){1,1}template= [OR]
RewriteCond %{QUERY_STRING} (&|%3F){1,1}tmpl= [NC]
RewriteRule ^index.php$ http%2://karavias.worldofweb.gr/ [R,L]
##### Custom Rules (Top of File) -- END

The site is running under a subdomain.

Now when calling the site and putting for example: karavias.worldofweb.gr/?tmpl=offline I get the offline page of the Joomla site.

Can you please help me and tell me what i am doing wrong ??

Thank you very much for your time.

Best Regards

Alexandros Mantas

Alexandros

nicholas
Akeeba Staff
Manager
You shouldn't put that code in .htaccess. Instead, just go to Admin Tools, Web Application Firewall, Configure WAF and enable the "Block tmpl=foo system template switch" option. This will block this kind of direct access.

If you really (really) insist, you can put some code in your .htaccess file. First a warning: if you do that, expect that some third party extensions will cease working. That said, the correct code is this:
RewriteCond %{QUERY_STRING} (^|&)tmpl=(component|system) [NC]
RewriteRule .* - [L]
RewriteCond %{QUERY_STRING} (^|&)t(p|emplate|mpl)= [NC]
RewriteRule .* - [F]

as you can read in my Master .htaccess. The code you used is most likely taken from the Joomla! documentation wiki which uses a botched derivative of an ancient version of my Master .htaccess ;)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

atg1967
hello again Nicolas and thank you for your quick response :)

I have removed the custom code from the .htaccess and opened the Web Application Firewall, I have seen that the parameters there are by default set to yes, but still i have the same issue. I have a screen-shot on how the parameters are setted.

Do i need to enable the WAF anywhere ?

Euxaristw ;)

Alex

Alexandros

atg1967
Nicola,

Ohhhh i am sooooo sorry, yes it does work, i just checked it myself again and it works, sorry for my previous reply.

Alex

Alexandros

nicholas
Akeeba Staff
Manager
No problem! I guess we can close this ticket?

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!