Support

Admin Tools

#28927 create htaccess, then 404s and 403s become 500 errors

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 on Sunday, 21 January 2018 17:17 CST

[email protected]
Hello. Created a new .htaccess with admin tools pro. When I do this, custom error pages no longer work (they are very simple such as /403.html). Instead, 404s and 403s result in a 500 error, and it does not display the custom 500 error page...usually just a blank white page instead.

I've tried removing the admin tools part of the file, then error pages work perfectly. Regardless of all this, the entire rest of the site works perfectly with or without the htaccess. Not sure where exactly to look. Any advice would be appreciated...

These were the default htaccess settings in admin tools with the exception of blocking known bad robots, which i did not include.

dlb
In .htaccess Maker, in the "Allow direct access, including .php files, to these directories" field, you need to add the path to your template folder. Just add a blank line and put
templates/FolderName
Where FolderName is the name of the folder for your default front end template.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

[email protected]
Hi Dale, thank you for responding so quickly.

I did check and this setting was in effect already.

##### Advanced server protection rules exceptions -- BEGIN
RewriteRule ^administrator\/components\/com_akeeba\/restore\.php$ - [L]
RewriteRule ^administrator\/components\/com_admintools\/restore\.php$ - [L]
RewriteRule ^administrator\/components\/com_joomlaupdate\/restore\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !(\.php)$
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^\.well\-known/ - [L]
RewriteRule ^templates\/flex/ - [L]
##### Advanced server protection rules exceptions -- END
ErrorDocument 404 /templates/flex/404.html
ErrorDocument 500 /templates/flex/500.html
ErrorDocument 403 /templates/flex/403.html


Anything wrong there? I set apache to debug and tried figuring out what was happening, but I do not get much information.... The below shows me trying to generate a 404 error....

127.0.0.1 - - [21/Dec/2017:15:07:39 -0600] "GET /32123481324.html HTTP/1.0" 500 211 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36"
127.0.0.1 - - [21/Dec/2017:15:07:39 -0600] "GET /32123481324.html HTTP/1.0" 500 211 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36"
127.0.0.1 - - [21/Dec/2017:15:07:39 -0600] "GET /32123481324.html HTTP/1.0" 500 211 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36"
127.0.0.1 - - [21/Dec/2017:15:07:39 -0600] "GET /32123481324.html HTTP/1.0" 500 211 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36"

...and in the error log:
[Thu Dec 21 15:07:39.041511 2017] [proxy:debug] [pid 8878:tid 139887520954112] proxy_util.c(2156): AH00942: FCGI: has acquired connection for (*)
[Thu Dec 21 15:07:39.041516 2017] [proxy:debug] [pid 8878:tid 139887520954112] proxy_util.c(2209): [client 73.55.207.149:38884] AH00944: connecting fcgi://localhost/var/www/html/index.php to localhost:8000
[Thu Dec 21 15:07:39.041519 2017] [proxy:debug] [pid 8878:tid 139887520954112] proxy_util.c(2246): [client 73.55.207.149:38884] AH02545: fcgi: has determined UDS as /var/run/php/php7.1-fpm.sock
[Thu Dec 21 15:07:39.041630 2017] [proxy:debug] [pid 8878:tid 139887520954112] proxy_util.c(2418): [client 73.55.207.149:38884] AH00947: connected /var/www/html/index.php to httpd-UDS:0
[Thu Dec 21 15:07:39.041663 2017] [proxy:debug] [pid 8878:tid 139887520954112] proxy_util.c(2789): AH02823: FCGI: connection established with Unix domain socket /var/run/php/php7.1-fpm.sock (*)
[Thu Dec 21 15:07:39.077052 2017] [proxy:debug] [pid 8878:tid 139887520954112] proxy_util.c(2171): AH00943: FCGI: has released connection for (*)


Nothing at all of significance in related Nginx logs.

dlb
The only thing that jumps out at me is the back slash in the template line. Let's try it with a forward slash in .htaccess Maker. If the other lines were a problem we wouldn't know it because we aren't trying to restore just yet.


Dale L. Brackin
Support Specialist


us.gifEnglish: native


Please keep in mind my timezone and cultural differences when reading my replies. Thank you!


????
My time zone is EST (UTC -5) (click here to see my current time in Philadelphia, PA)

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

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!