Skip to content

Instantly share code, notes, and snippets.

@cengkuru
Last active June 8, 2016 08:08
Show Gist options
  • Save cengkuru/4df15aa6dfb0187ca223f967b5aa3aed to your computer and use it in GitHub Desktop.
Save cengkuru/4df15aa6dfb0187ca223f967b5aa3aed to your computer and use it in GitHub Desktop.
default codeigniter .htaccess to remove php extension
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.(css|gif|ico|jpg|js|png|swf|txt)$
RewriteCond $1 !^(index\.php|images|captcha|css|js|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ //index.php/$1 [L]
<Files "index.php">
AcceptPathInfo On
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment