How does Bludit handle URLs?

Post Reply
koljaxyz
Ssr. Bludit
Posts: 10
Joined: Thu Apr 30, 2020 10:24 am

Fri May 08, 2020 12:55 pm

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?
User avatar
Edi
Site Admin
Posts: 1846
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Fri May 08, 2020 10:15 pm

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
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
koljaxyz
Ssr. Bludit
Posts: 10
Joined: Thu Apr 30, 2020 10:24 am

Sat May 09, 2020 7:37 pm

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");
User avatar
Edi
Site Admin
Posts: 1846
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Sat May 09, 2020 10:15 pm

Have you tried the following:

Code: Select all

header("Location: contact?mailsend");
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
koljaxyz
Ssr. Bludit
Posts: 10
Joined: Thu Apr 30, 2020 10:24 am

Sun May 10, 2020 9:41 am

Perfect, this works!
Post Reply