After hiding the Extensions the Success or Error Page does not show
Posted: Sun Sep 03, 2023 6:53 am
@pablo
I have checked the Hide file extensions for internal links
As it removes extensions such as html and php from the script it also did same for the php form script as it is the purpose to do so which is expected.
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'contact_grid')
{
$mailto = 'example.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = '';
$message = ':';
$success_url = './success';
$error_url = './error';
PHP Warning: file_get_contents(./success): failed to open stream: No such file or directory in /home/u********/domains/domain.com/public_html/index.php on line ***
Success and error page both are in the same folder as the index page directory.
I manually edited
$success_url = './success';
$error_url = './error';
in to
$success_url = 'https:// domain.com/success';
$error_url = 'https:// domain.com/error';
then it works but that does not serve the purpose of the advanced option to Hide file extensions for internal links. Because then I have to use the absolute links although it says No such file or directory which does exist but has to be directed with absolute link but when it is done using ./pagename it does not seem to work. But if the Hide file extensions for internal links is turned off it works fine but with extensions.
Here is the demo: https://temp-file.org/dUAr6PdJch7VhVX/file
I have checked the Hide file extensions for internal links
As it removes extensions such as html and php from the script it also did same for the php form script as it is the purpose to do so which is expected.
}
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['formid']) && $_POST['formid'] == 'contact_grid')
{
$mailto = 'example.com';
$mailfrom = isset($_POST['email']) ? $_POST['email'] : $mailto;
$subject = '';
$message = ':';
$success_url = './success';
$error_url = './error';
PHP Warning: file_get_contents(./success): failed to open stream: No such file or directory in /home/u********/domains/domain.com/public_html/index.php on line ***
Success and error page both are in the same folder as the index page directory.
I manually edited
$success_url = './success';
$error_url = './error';
in to
$success_url = 'https:// domain.com/success';
$error_url = 'https:// domain.com/error';
then it works but that does not serve the purpose of the advanced option to Hide file extensions for internal links. Because then I have to use the absolute links although it says No such file or directory which does exist but has to be directed with absolute link but when it is done using ./pagename it does not seem to work. But if the Hide file extensions for internal links is turned off it works fine but with extensions.
Here is the demo: https://temp-file.org/dUAr6PdJch7VhVX/file