Problem with return parameter mangling characters
Posted: 07 May 2008 07:17 PM   [ Ignore ]
Newbie
Rank
Total Posts:  23
Joined  2008-04-30

Awesome module Freeform is! Thanks tons!

When using the return parameter I get a malformed URL. If I use:

return="forms/success" I get “http://www.site.com/index/forms/success” which takes the user to the index page rather than the success page. Somehow that index is making it in the url.

If I use return="{site_url}forms/success" I get

http://www.site.com/forms/success

with the forward slash between the forms and success replaced with the special character “and pound 47 simicolon”.

I am using a rewrite code to get rid of the index.php in my urls:

RewriteEngine On
RewriteCond 
$!^(images|eeadmin|themes|favicon\.ico|robots\.txt|index\.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.*)$ /index.php/$1 [L]

This is referenced in this post at Expression Engine but the fix was way before my version (2.6.5 with EE 1.6.3 build 20080319. I am thinking that it may be my rewrite code interfering as more people would have reported it.

Any ideas?

Profile
 
 
Posted: 08 May 2008 07:20 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18

What do you have for your URL in your General Configuration:

CP Home › Admin › System Preferences › General Configuration

URL to the root directory of your site

smile
 Signature 
Profile
 
 
Posted: 08 May 2008 05:58 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  23
Joined  2008-04-30

http://ici-ee.janasnyder.com/

It is a test server

Profile
 
 
Posted: 09 May 2008 06:16 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18

Oops… LOL

What does it say in this field:

Name of your site’s index page

It should be empty if you’re going the mod_rewrite route wink

 Signature 
Profile
 
 
Posted: 09 May 2008 06:25 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  23
Joined  2008-04-30

Really?  sick
I have been using the site url all along with all the sites I have developed. I will try this new bit of info and let you know.

Profile
 
 
Posted: 09 May 2008 06:36 AM   [ Ignore ]   [ # 5 ]
Newbie
Rank
Total Posts:  23
Joined  2008-04-30

Interesting. I went to:
CP Home › Admin › System Preferences › General Configuration

and removed “index” from the field:
“Name of your site’s index page”

but left “http://www.thedomain.com/” from:
“URL to the root directory of your site”

And that fixes the problem.

A side question…
What is the use of the configuration setting “URL to the root directory of your site” if it should be blank? What I typically do is use it in the configuration settings where it asks for urls like here:

CP Home  ›  Admin  ›  Weblog Administration  ›  File Upload Preferences  ›  Edit File Upload Preferences
URL of Upload Directory
whose value is currently
"{site_url}images/partners/"

Profile
 
 
Posted: 09 May 2008 06:45 AM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18
Eric Snyder - 09 May 2008 06:36 AM

A side question…
What is the use of the configuration setting “URL to the root directory of your site” if it should be blank? What I typically do is use it in the configuration settings where it asks for urls like here:

CP Home  ›  Admin  ›  Weblog Administration  ›  File Upload Preferences  ›  Edit File Upload Preferences
URL of Upload Directory
whose value is currently
"{site_url}images/partners/"

URL to the root directory of your site should NOT be empty wink
Name of your site’s index page should be empty wink

EDIT

 Signature 
Profile
 
 
Posted: 09 May 2008 06:55 AM   [ Ignore ]   [ # 7 ]
Newbie
Rank
Total Posts:  23
Joined  2008-04-30

Dope! (big dope slap is heard)

Thanks, I got it.

Again, awesome piece of code Freeform is!

Profile