URL rewirte with htaccess / php-fpm

timtim1234

Verified User
Joined
Nov 2, 2020
Messages
9
Hello
I am using a PHP script which ist rewritten by the htaccess to .html URLs.
Since I changed to my new server with the current DirectAdmin I have the problem
that the php files are not written into .html files.
When I click on a link the browser starts to downlaod a .html site.
Is this because the server now uses php-fpm?

Thank You in advance
Tim
 
You need to install htscanner

set it in options.conf
Then
./build htscanner

although not totally sure I follow you.
 
What was the previous PHP Handler? Try commenting out any AddHandler or AddType directives in the .htaccess?
 
Code:
cd /usr/local/directadmin/custombuild
./build clean
./build update
./build rewrite_confs

Does this help?
 
The previous handler was
apache2handler

The htaccess looks like this


AcceptPathInfo On
<Files topic>
ForceType application/x-httpd-php
</Files>
<Files forum>
ForceType application/x-httpd-php
</Files>
 
Does the browser download page explicitly state that it is trying to download content of type application/x-httpd-php? Try commenting those .htaccess rules out and then reloading in Incognito? We see the same download pages often with AddType AddHandler statements when a php handler is switched, and usually the download box shows the same content type as being set in the .htaccess rules.
 
Back
Top