CodeIgniter Forums
htaccess file not allowed - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: htaccess file not allowed (/showthread.php?tid=23079)



htaccess file not allowed - El Forum - 09-29-2009

[eluser]gevans[/eluser]
If I'm unable to use a htaccess file on a certain host, is there another way to get index.php out of the URI?


htaccess file not allowed - El Forum - 09-29-2009

[eluser]renownedmedia[/eluser]
No... And I think you'll want to get a better host, there are tons of cheap ones out there that support this!


htaccess file not allowed - El Forum - 09-30-2009

[eluser]gevans[/eluser]
This is not my host. Our company use a reseller package. One of our clients is on IIS. They're just going to have to put up with the inde.php/ in the URI.

Thanks for the reply.


htaccess file not allowed - El Forum - 09-30-2009

[eluser]n0xie[/eluser]
You can do rewrite rules in IIS. We use Helicon's Isapi Rewrite (version 2). Commercial licence is not that expensive. It's not quite as powerful as mod_rewrite but still removing the index.php from the url is trivial plus you get access to HTTP_X_REWRITE_URL (which is equal to PATH_INFO under Apache) which takes a lot of headaches away since you can just do:

Code:
$config['uri_protocol']    = "HTTP_X_REWRITE_URL";

and it works just as it would in an Apache environment:
Code:
//httpd.ini
[ISAPI_Rewrite]
RewriteRule /(.*) /index.php/$1 [I,L]