Hi, avid user of freeform here, running 2.6.6.
First off, thanks very much for a quality product. We use it on nearly every site we build.
My site is http://www.eternaljewishfamily.org. I recently told HTACCESS to rewrite my URLs so “www” always appears, and ever since I did that, freeform stopped working. The notification emails don’t go out, the form doesn’t redirect or validate, and the entry isn’t added to the database. Total meltdown. I’ve tried two different methods inside HTACCESS to prepend the WWW and both cause the form to fail:
First I’m looking specifically for calls to eternaljewishfamily.org and adding the WWW:
RewriteCond %{HTTP_HOST} ^eternaljewishfamily.org [NC]
RewriteRule ^(.*)$ http://www.eternaljewishfamily.org/$1 [L,R=301]
The second method is looking for anything which is NOT www.eternaljewishfamily.org and rewriting it as such:
RewriteCond %{HTTP_HOST} !^www\.eternaljewishfamily\.org$ [NC]
RewriteRule ^(.*)$ http://www.eternaljewishfamily.org/$1 [R=301,L]
But as I said both methods break freeform. Do you have any workaround for this?
Thanks very much
/\/\
Meir Deutsch
Just to make sure, if you remove that part of the .htaccess, Freeform works properly?
that’s correct
What happens if you try this instead? ![]()
Options +FollowSymlinks
RewriteCond %{http_host} ^eternaljewishfamily.org [NC]
RewriteRule ^(.*)$ http://www.eternaljewishfamily.org/$1 [R=301,L]
nope, no luck.
Hi again, still no answer?
Perhaps it helps to mention that I’ve rewritten my site’s index file as “site” instead of “index.php”. So here’s the htaccess:
RewriteEngine on
directoryIndex index.php
RewriteCond %{HTTP_HOST} ^ejf.org [NC]
RewriteRule ^(.*)$ http://www.eternaljewishfamily.org/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^eternaljewishfamily.org [NC]
RewriteRule ^(.*)$ http://www.eternaljewishfamily.org/$1 [L,R=301]
<Files site>
ForceType application/x-httpd-php
</Files>
Hi there Meir,
Is it at all possible to test this further by changing the Index back to “index.php” (instead of “site”?)?
And see what happens?
I’ve just tried it, with the same result.
Meir,
I’ll test this further. I will get back to you by tomorrow ![]()
Thank you for your patience…
Meir,
I apologize for the wait on this…
I tried adding this code to my .htaccess and I did not have any issues: ![]()
Options +FollowSymlinks
RewriteCond %{http_host} ^mysite.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]
It stored in Database and sent out notification emails.
The only other thing I can see maybe causing this issue would be server configuration, or this:
RewriteEngine on
directoryIndex index.php
Hey pie man,
I was able to isolate the problem to the RewriteEngine directive. The somewhat-consolidated version of my htaccess now reads:
directoryIndex index.php
# RewriteEngine On
RewriteCond %{HTTP_HOST} ^ejf.org [NC,OR]
RewriteCond %{HTTP_HOST} ^www.ejf.org [NC,OR]
RewriteCond %{HTTP_HOST} ^eternaljewishfamily.org [NC]
RewriteRule ^(.*)$ http://www.eternaljewishfamily.org/$1 [L,R=301]
<Files site>
ForceType application/x-httpd-php
</Files>
...and the form works. Uncomment that rewrite line, and it breaks again. If there’s something in the PHP or APACHE config which might help, I can PM that to you.
THANK YOU!!
Hmmm… strange…
Well, it works, so I wouldn’t fiddle any further with it, haha
But it DOESNT work. By commenting out the RewriteEngine directive, I’m disabling all my SEO redirects, which was the point of this whole exercise.
Unfortunately this stuff goes beyond my knowledge… and as I mentioned before, I have been able to use the same .htaccess code on my test site, and it works.
Can you try using other functions similar, like posting a comment, or trying the Communicate Tab in the CP?
got it. the general configuration of my EE install had the root directory of my site as http:/eternaljewishfamily.org/ ...instead of… http://www.eternaljewishfamily.org/ ...and by adding the www to the URL, the problem resolved itself.
Like any good breakup, “It’s not you, it’s me!”
Thanks for your help!
/\/\
Meir
Haha, awesome! Thanks for the followup