CodeIgniter Forums
IIS how to remove index.php from url go? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: IIS how to remove index.php from url go? (/showthread.php?tid=16009)



IIS how to remove index.php from url go? - El Forum - 02-22-2009

[eluser]RING[/eluser]
IIS how to remove index.php from url go?

what i want is that rewrite URL just when the url do NOT direct a exist file or a exist folder

apache rewrite:

Quote:RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

rewrite URL just when the url do NOT direct a exist file or a exist folder


but IIS (ISAPI Rewrite) how to define RewriteCond to achieve just like "RewriteCond %{REQUEST_FILENAME} !-d"?
IIS rewrite is a little different from Apache rewrite.

IIS rewrite:
Quote:[ISAPI_Rewrite]
RewriteCond I WANT THE ANSWER HERE
RewriteCond $1 !^(index.php|images|robots\.txt)

RewriteRule ^(.*)$ index.php/$1 [L]