Welcome Guest, Not a member yet? Register   Sign In
mod rewrite problem
#1

[eluser]Unknown[/eluser]
*POSTED THIS IN Code and Application INSTEAD*

*Please remove*


I've made a website that works without problems on my localserver, but when I upload the site to my webserver it seems like the mod rewrite doesn't work for some reason.

my .htaccess:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/main/main/$1 [L]

in my main controller i access the uri in this way. (debugging)

Code:
$id = $this->uri->segment(3);
echo "$id";

But it doesnt echo anything. If I do an uri->segment(2) it echos "main".

If you look at http://www.findareacode.org/index.php/main/main/2xx/ it displays everything correctly.
But if you go to the mod rewrite adress: http://www.findareacode.org/2xx/ there is errormessages, and it seems like the variables from the controller hasn't been sent to the view file. (Most probably because the uri->segment(3) is void)

Any thoughts?




Theme © iAndrew 2016 - Forum software by © MyBB