Welcome Guest, Not a member yet? Register   Sign In
[solved] Rewrite redirect() generates backslash on IIS - Please help
#1

[eluser]Velin[/eluser]
Hi there,

I'm working on my second project in Codeigniter, and it's with great grief and horror that I have to publish this site on an IIS server.

In order to preserve my .htaccess rewrite functionality in my Codeigniter project, I have installed ISAPI Rewrite 3.0 on the IIS box to host the CI site.
My .htaccess file is copied directly from my Apache dev server, and it works flawlessly on IIS using ISAPI Rewrite, for just about everything.
So far ISAPI Rewrite 3.0 looks like a good piece of software.


However, when I attempt to use the redirect() function on my IIS box it redirects to a URL containing a backslash. - This does not happen on Apache, using exactly the same config.

While I realise that this is a probably an IIS/Rewrite problem, and probably doesn't have anything to do with CI, I was hoping one of you have encountered a similar problem.


Example:

On Apache: http://site.dev/login redirects correctly to http://site.dev/login/go
On IIS using the same rewrite conditions, the url redirects to http://site.dev\/login/go



My login controller looks as follows (not surprising):
---
function index()
{
redirect('login/go');
}
---


My .htaccess file:
---
RewriteEngine on
RewriteCond $1 !^(index\.php|img|css|js|robots\.txt)
RewriteRule ^(.*)$ \/index.php/$1 [L]
---


Any help or advise would be greatly apreciated, thanks.


Messages In This Thread
[solved] Rewrite redirect() generates backslash on IIS - Please help - by El Forum - 10-14-2008, 09:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB