I am working with Codeigniter and WordPress for a website.
Codeigniter installed on the root directory. WordPress which is used for the blog in the subdomain directory inside the root folder.
Here is the directory structure.
var/www/html/codeigniter -- Root website here
/var/www/html/codeigniter/blog -- sub-domain for wordpress blog
here is the .htacess file for Root Directory (var/www/html/codeigniter)
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
here is the.htaccess file for the blog directory (/var/www/html/codeigniter/blog)
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>