Welcome Guest, Not a member yet? Register   Sign In
redirect() invalidates htaccess rules
#1

[eluser]Unknown[/eluser]
I've got a htaccess running that removes the index.php and also removes the www from the URL. This is the setup:

Code:
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$ [NC]
RewriteRule ^.*$ http://mydomain.com%{REQUEST_URI} [R=301,L]
RewriteCond $1 !^(index\.php|images|content|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Now, if I use in any controller the URL helper "redirect" method like this:

Code:
redirect('/somewhere', 'location');

it breaks my rewrite rules and and my URL looks like this again:
Code:
/index.php/somewhere

EDIT: It happens also if I use the refresh parameter. Is there some way to get this working?

Thanks
Martin




Theme © iAndrew 2016 - Forum software by © MyBB