Page extensions change back to .php (v. 2.9 - 2.93)
In version 2.9x, the system checks for an AddHandler or AddType statement in the main .htaccess file. If that statement doesn't exist, the system automatically converts the extensions back to .php extensions. This can cause a problem if the type is added elsewhere in the server.
To change this to just a warning, make the following changes to the variables.php file in the /storeadmin/ folder. Note that this will allow .htm or .html extensions, even if the site isn't set to accept PHP code within pages using these extensions.
-
Change the code:
$extension_array = array('php');to:
$extension_array = array('php', 'htm', 'html');
$typeorhandler = 'n'; -
Change the code:
array_push($extension_array, 'htm', 'html');
to:
$typeorhandler = 'y';
-
Change the code:
if (!in_array($openrow['PageExt'], $extension_array))
to:
if ($_POST['Submit'] == "Update" AND $typeorhandler == 'n' AND ($openrow['PageExt'] == 'htm' OR $openrow['PageExt'] == 'html'))
-
Save and reload the /storeadmin/variables.php file.