Welcome Guest, Not a member yet? Register   Sign In
Client convinced to use CodeIgniter instead of .NET
#8

[eluser]n0xie[/eluser]
[quote author="JulianM" date="1233605314"]
I really would like to run on apache, since I have more experience. For example my concern is if I would have problems with rewrites or removing the index.php from URL in IIS.
[/quote]
It is possible but the rewrite rules are usually in a different format than the normal (apache) .htaccess, so finding documentation is harder. You could use an external module (we use Helicon's) for handling rewrite rules.

We also had a Big Company™ who bought into the whole Windows infrastructure. It took a while to get the rewriting working for us. One of the big disadvantages we had was that PATH_INFO was not available (which is the preferred uri_protocol imho. This bit of code fixed it for us, but you might have to experiment a bit. Hope it helps you a little bit:
Code:
/* httpd.ini */

// we keep all assets in /public
RewriteRule /(?:public)/(.*) $0 [I,L]
RewriteRule /favicon\.ico $0 [I,L]
RewriteRule /robots\.txt $0 [I,L]
RewriteRule /sitemap\.xml $0 [I,L]
RewriteRule /(.*) /index.php/$1 [I,L]

[code]
/* config.php */
    // IIS Hack
    if (isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'IIS') > 0)
    {
        $pos = strpos($_SERVER['HTTP_X_REWRITE_URL'],'?');
        if ($pos !== FALSE)
            $_SERVER['HTTP_X_REWRITE_URL'] = substr($_SERVER['HTTP_X_REWRITE_URL'],0,$pos);
        $config['uri_protocol']    = "HTTP_X_REWRITE_URL";
    }
    else
    {
        $config['uri_protocol']    = "PATH_INFO";
    }


Messages In This Thread
Client convinced to use CodeIgniter instead of .NET - by El Forum - 02-02-2009, 06:21 AM
Client convinced to use CodeIgniter instead of .NET - by El Forum - 02-02-2009, 07:27 AM
Client convinced to use CodeIgniter instead of .NET - by El Forum - 02-02-2009, 07:43 AM
Client convinced to use CodeIgniter instead of .NET - by El Forum - 02-02-2009, 08:05 AM
Client convinced to use CodeIgniter instead of .NET - by El Forum - 02-02-2009, 08:08 AM
Client convinced to use CodeIgniter instead of .NET - by El Forum - 02-02-2009, 08:12 AM
Client convinced to use CodeIgniter instead of .NET - by El Forum - 04-02-2010, 12:31 AM
Client convinced to use CodeIgniter instead of .NET - by El Forum - 04-02-2010, 02:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB