How does Bludit handle URLs?

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

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: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

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
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
koljaxyz
Ssr. Bludit
Posts: 12
Joined: Thu Apr 30, 2020 10:24 am

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: 3121
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Has thanked: 54 times
Been thanked: 77 times
Contact:

Have you tried the following:

Code: Select all

header("Location: contact?mailsend");
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
koljaxyz
Ssr. Bludit
Posts: 12
Joined: Thu Apr 30, 2020 10:24 am

Perfect, this works!
Post Reply