@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
After hiding the Extensions the Success or Error Page does not show
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/forms.html
http://www.wysiwygwebbuilder.com/form_wizard.html
Frequently Asked Questions about Forms
- wwonderfull
-
- Posts: 1558
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
After hiding the Extensions the Success or Error Page does not show
Last edited by wwonderfull on Wed Feb 14, 2024 2:54 am, edited 2 times in total.
Re: After hiding the Extensions the Success or Error Page does not show
Are you suggesting that the extension should not be removed from the PHP links?
- wwonderfull
-
- Posts: 1558
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: After hiding the Extensions the Success or Error Page does not show
I was saying if extension is removed it does not show the success page or error page and wanted a solution. From the code it does remove the .html or .php but the pages do not show.
I wanted to hide the extensions which it did but the page did not direct.
./success should do the same as ./success.html but the ./success is not working I think.
Re: After hiding the Extensions the Success or Error Page does not show
I think it's best of the extension is not removed from links in PHP code. it looks like the server cannot handle this.
- wwonderfull
-
- Posts: 1558
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: After hiding the Extensions the Success or Error Page does not show
Well is there any workaround for it if it can be thought.
Re: After hiding the Extensions the Success or Error Page does not show
Currently, the only workaround is not to hide page extensions.
- wwonderfull
-
- Posts: 1558
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: After hiding the Extensions the Success or Error Page does not show
What if in the form we see the success and error page url where it asks us to select the both pages, what if we could manually write the direct url for example as I tested the url worked.
$success_url = 'https:// domain.com/success';
$error_url = 'https:// domain.com/error';
So the success and error page are being called with the absolute url from the directory.
Absolute url's work without extensions as I had tested. It could be a solution.
$success_url = 'https:// domain.com/success';
$error_url = 'https:// domain.com/error';
So the success and error page are being called with the absolute url from the directory.
Absolute url's work without extensions as I had tested. It could be a solution.
Re: After hiding the Extensions the Success or Error Page does not show
I am not sure if this will if the script also needs to processed variable on the success or error page.
Usually this will throw a security error. I think absolute links will only work for redirect.
Usually this will throw a security error. I think absolute links will only work for redirect.
- wwonderfull
-
- Posts: 1558
- Joined: Fri Aug 21, 2020 8:27 am
- Contact:
Re: After hiding the Extensions the Success or Error Page does not show
Another thing I noted is that although extensions are removed from the form as I have set target _blank it opens a new window tab
and the url looks something like this. https://example.com/index.php (and the success page shows on that url)
I was thinking if the extension is removed via htaccess or even directly from wwb how does the target get to the index along with the .php extension at the end.
and the url looks something like this. https://example.com/index.php (and the success page shows on that url)
I was thinking if the extension is removed via htaccess or even directly from wwb how does the target get to the index along with the .php extension at the end.
Re: After hiding the Extensions the Success or Error Page does not show
The actual file still will have the php extension otherwise the server will not know what type of file it is dealing with.