我在以下页面有一个登录表单:
site.com/en/downloads
“en” 是 user_language (并存储在全局变量中)
当我登录时,表单会将我重定向到:
site.com/downloads
虽然它应该使用我的 user_language 将我重定向到 URL
我尝试了很多东西,但返回值的值总是被忽略。
- 返回 =”{site_url}/{user_language}/downloads”</li>
- 返回 =”{site_url}”</li>
- 返回 =“http://site.com”</li>
- 返回 =“http://google.com”</li>
- return =“关于/索引”</li>
他们都重定向到 site.com/downloads。
正在输出的代码(对于最后一个示例)如下所示:
<form method="post" action="http://site.com/" >
<div class='hiddenFields'>
<input type="hidden" name="XID" value="9fae3b1b5fcf882776da6638706595af73a7b15d" />
<input type="hidden" name="ACT" value="7" />
<input type="hidden" name="RET" value="about/index" />
<input type="hidden" name="site_id" value="1" />
</div>
我有一个看起来像这样的 .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
更新:
我尝试按照建议使用freemember,但问题仍然存在:
I've set the return value to "about/index", but I'm still being redirected to site.com/downloads.
The code generated by freemember looks solid though, so something must be overriding the return value.
<form method="post" action="http://site.com/downloads" >
<div class='hiddenFields'>
<input type="hidden" name="XID" value="d9483688fbf63d9ea47e89a66e074b99f5b8465c" />
<input type="hidden" name="ACT" value="18" />
<input type="hidden" name="_params" value="wvkEsN96mPfmlhgerM2ppxGbMmiLJrz0Ntn7apKer/rmBpQaUozvSM0TvkVN66QlX/ptCM1IQGsuZuw7X3mzlOMCFIUyYFpbZy5h7nfPJMiHLdpqXqwBFOiA/zcNW0GKAIicv4JPAS2mfHKQE+mb2Ct0L+jhGz0NlSdELuMOeqQPJJ3B7U90D5w/sKTeaX5zaOMSvKJ4LZ7xP0Dn+UxE9g==" />
<input type="hidden" name="return_url" value="about/index" />
<input type="hidden" name="site_id" value="1" />
</div>