Page 1 of 1

How does Bludit handle URLs?

Posted: Fri May 08, 2020 12:55 pm
by koljaxyz
Hi guys,

in my contact.php template I have built a contact form like in this turoial: https://www.youtube.com/watch?v=4q0gYjAVonI. When I click on the button, the mail will be sent, so everything is alright so far. But I don’t understand what to put in the last line.

Code: Select all

header("Location: contact.php?mailsend");
Bludit tries to load the page but couldn’t find it. It just should load the contact page again. Or even better, I want to have a simple page with a short message that the mail has been sent. How do I archive this in Bludit? How do I handle working with URLs?

Re: How does Bludit handle URLs?

Posted: Fri May 08, 2020 10:15 pm
by Edi
Is the template contact.php used for a page with a title like contact or an additional external page? How does it work?

Bludit does not use pages with the suffix php. The filenames are rewritten in the file .htaccess:

Code: Select all

# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [PT,L]
Anyway, you can use for the task the plugin Contact3:

https://plugins.bludit.com/plugin/contact3

Re: How does Bludit handle URLs?

Posted: Sat May 09, 2020 7:37 pm
by koljaxyz
Edi wrote: Fri May 08, 2020 10:15 pm Is the template contact.php used for a page with a title like contact?
Yes, the page is titled with "contact" and I named the template the same.

How can I link an other page in this mail php file?

Code: Select all

header("Location: contact.php?mailsend");

Re: How does Bludit handle URLs?

Posted: Sat May 09, 2020 10:15 pm
by Edi
Have you tried the following:

Code: Select all

header("Location: contact?mailsend");

Re: How does Bludit handle URLs?

Posted: Sun May 10, 2020 9:41 am
by koljaxyz
Perfect, this works!