Home > CodeIgniter > How to write SEO friendly urls in CodeIgniter

How to write SEO friendly urls in CodeIgniter

Hi,

create  .htaccess file with the following contents.

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

Then url is  http://localhost/codeIgniter/<controller-name>/<method-name> /

It will be useful.

Thank you

Categories: CodeIgniter
  1. August 25, 2009 at 8:48 am | #1

    Can u provide more example URLs

  1. No trackbacks yet.