Posted By

telltec on 02/02/13


Tagged

wordpress htaccess codeigniter cleanurl


Versions (?)

.htaccess for Codeigniter in Wordpress subfolder


 / Published in: Other
 

Try to run Codeigniter in a subfolder of a Wordpress installation and want to remove index.php for clean URLs?

Put this code in a .htaccess file in your codeigniter directory ("cidir" in this example).

  1. <IfModule mod_rewrite.c>
  2. RewriteEngine On
  3. RewriteBase /cidir
  4. RewriteCond $1 !^(index\.php|images|robots\.txt)
  5. RewriteCond %{REQUEST_FILENAME} !-f
  6. RewriteCond %{REQUEST_FILENAME} !-d
  7. RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
  8. </IfModule>

Report this snippet  

You need to login to post a comment.