[eluser]Jan_1[/eluser]
Hi everybody! Could someone please help me or give me a hint how to solve it?
I am doing a survey. That happens on my_domain.com/
question/index.php
I have a
JQuery/Javascript, that posts data to a CI controller (my_domain.com/
vote/index.php). The Javascript is called from the
question-view (by question-controller)
In my session are userdata "question_number" and "last_question".
In my
vote-controller, called by the javascript, I do want to do a redirect to the 'survey-result-page' if $question_number > $last_question.
vote.php:
Code:
if( $question_number > $last_question)
{
echo "X";
redirect('http://google.com', 'refresh');
}
That works, because I do get the "X". but it does not redirect. I think it is because the ouput is already done by the
question-controller. What could I do?
Or is it not that but a .htaccess-question?
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Removes index.php URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>
Every hint appriciated! Thank You!