Formbuilder: form not working on homepage
-
- Forum Members
- Posts: 13
- Joined: Thu Apr 01, 2010 9:46 am
Formbuilder: form not working on homepage
I use a basic form in one of my templates.
If the form is submitted on a subpage, everything works fine, if it is submitted on the homepage, nothing happens.
I am clueless. Any thoughts?
The form can be found on the bottom right of the page
homepage: www.myanmarreizen.be (or accessed through www.myanmarreizen.be/myanmar/home -> gives the same non-result)
subpage with same template: www.myanmarreizen.be/test (or www.myanmarreizen.be/myanmar/test) -> works fine, form is sent, user is redirected.
Thanks in advance,
Oscar
If the form is submitted on a subpage, everything works fine, if it is submitted on the homepage, nothing happens.
I am clueless. Any thoughts?
The form can be found on the bottom right of the page
homepage: www.myanmarreizen.be (or accessed through www.myanmarreizen.be/myanmar/home -> gives the same non-result)
subpage with same template: www.myanmarreizen.be/test (or www.myanmarreizen.be/myanmar/test) -> works fine, form is sent, user is redirected.
Thanks in advance,
Oscar
Re: Formbuilder: form not working on homepage
The test page has the correct action URL the home page doesn't...
action="http://www.myanmarreizen.be/test"
Home page, even though the address bar says myanmar/ ...
action="http://www.myanmarreizen.be/"
So it's sending it to a different page...
Viewing the page source is a wonderful thing
...
action="http://www.myanmarreizen.be/test"
Home page, even though the address bar says myanmar/ ...
action="http://www.myanmarreizen.be/"
So it's sending it to a different page...
Viewing the page source is a wonderful thing

-
- Forum Members
- Posts: 13
- Joined: Thu Apr 01, 2010 9:46 am
Re: Formbuilder: form not working on homepage
Thanks! This is probably due to .htaccess settings I guess...
Any thoughts on how to fix it? The form _is_ created by formbuilder, and afaik there is no way to modify the action URL manually...
This is the .htaccess of the myanmar folder:
This is the .htaccess of the root:
Any thoughts on how to fix it? The form _is_ created by formbuilder, and afaik there is no way to modify the action URL manually...
This is the .htaccess of the myanmar folder:
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /myanmar/
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>
Code: Select all
RewriteEngine on
RewriteCond %{HTTP_HOST} myanmarreizen\.be$ [NC]
RewriteRule ^$ http://www.myanmarreizen.be/myanmar [L]
RewriteCond %{HTTP_HOST} ^(www\.)?myanmarreizen.be$
RewriteCond %{REQUEST_URI} !^/reisconfig.*
RewriteRule !^myanmar/ myanmar%{REQUEST_URI} [L]
RewriteCond %{HTTP_HOST} ^(www\.)?myanmarreizen.be$
RewriteCond %{REQUEST_URI} !^/reisconfig.*
RewriteRule ^myanmar/(.*)$ /$1 [L]
-
- Forum Members
- Posts: 13
- Joined: Thu Apr 01, 2010 9:46 am
Re: Formbuilder: form not working on homepage
Adding this to the top of the root .htaccess solved the problem:
... and it broke the CMSMS forms (eg when changing the template of the formbuilder)
Any .htaccess experts in the room?
Code: Select all
RewriteCond %{REQUEST_METHOD} =POST
RewriteRule ^ - [L]
Any .htaccess experts in the room?
Re: Formbuilder: form not working on homepage
Try to use
as a condition for every rewrite_rule. If you're using all those conditions/rules you'd better know how things work out in my opinion.
Code: Select all
RewriteCond %{REQUEST_METHOD} !POST$
-
- Forum Members
- Posts: 13
- Joined: Thu Apr 01, 2010 9:46 am
Re: Formbuilder: form not working on homepage
Thanks for your reply!!
I've changed accordingly, but still get "The requested URL was not found on this server."
http://www.myanmarreizen.be/admin/moduleinterface.php
root .htaccess looks like:
myanmar .htaccess looks like:
I've changed accordingly, but still get "The requested URL was not found on this server."
http://www.myanmarreizen.be/admin/moduleinterface.php
root .htaccess looks like:
Code: Select all
RewriteEngine on
RewriteCond %{REQUEST_METHOD} !POST$
RewriteCond %{HTTP_HOST} myanmarreizen\.be$ [NC]
RewriteRule ^$ http://www.myanmarreizen.be/myanmar [L,QSA]
RewriteCond %{REQUEST_METHOD} !POST$
RewriteCond %{HTTP_HOST} ^(www\.)?myanmarreizen.be$
RewriteCond %{REQUEST_URI} !^/reisconfig.*
RewriteRule !^myanmar/ myanmar%{REQUEST_URI} [L,QSA]
RewriteCond %{REQUEST_METHOD} !POST$
RewriteCond %{HTTP_HOST} ^(www\.)?myanmarreizen.be$
RewriteCond %{REQUEST_URI} !^/reisconfig.*
RewriteRule ^myanmar/(.*)$ /$1 [L,QSA]
myanmar .htaccess looks like:
Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /myanmar/
# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
#
RewriteCond %{REQUEST_METHOD} !POST$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
</IfModule>
Re: Formbuilder: form not working on homepage
If I understand your code correctly you're trying to have the home page have the 'myanmar' at the end of the url?
You might consider using another approach but I'm not sure if that's working out well either technically and SEO wise.
Create a dummy home page and hide it from the menu, make it the default page.
Change the alias of the current homepage to 'myanmar' if not already done so.
Clean up your .htaccess
Create a rewrite rule with a REDIRECT from root url to the 'myanmar' page. I think a http 301 redirect is best option SEO wise. Probably it will make search engines index the /myanmar page and not the root url.
You might consider using another approach but I'm not sure if that's working out well either technically and SEO wise.
Create a dummy home page and hide it from the menu, make it the default page.
Change the alias of the current homepage to 'myanmar' if not already done so.
Clean up your .htaccess
Create a rewrite rule with a REDIRECT from root url to the 'myanmar' page. I think a http 301 redirect is best option SEO wise. Probably it will make search engines index the /myanmar page and not the root url.
-
- Forum Members
- Posts: 13
- Joined: Thu Apr 01, 2010 9:46 am
Re: Formbuilder: form not working on homepage
Good suggestion, thanks... By trying to do this, I cleaned up the .htaccess, and solved the entire problem 
It appeared that
was completely unnecessary.
Thanks for your help guys, CMSMS rocks

It appeared that
Code: Select all
RewriteCond %{REQUEST_METHOD} !POST$
RewriteCond %{HTTP_HOST} myanmarreizen\.be$ [NC]
RewriteRule ^$ http://www.myanmarreizen.be/myanmar [L,QSA]
Thanks for your help guys, CMSMS rocks
Re: Formbuilder: form not working on homepage
When using RewriteBase / the folder name you put there is not supposed to have the / at the end of it...
-
- Forum Members
- Posts: 13
- Joined: Thu Apr 01, 2010 9:46 am
Re: Formbuilder: form not working on homepage
Thanks Dr.Css! Completely right!