Reputation: 7808
I have Drupal 7 installed in the root directory of my site. The .htaccess file hasn't been modified since installation.
However, I also have CodeIgniter set up in a subdirectory. I created a .htaccess file in the CI directory with the suggested instructions to remove index.php from the url.
eg. mysite.com/subsite/index.php/blog --> mysite.com/subsite/blog
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Unfortunately doesn't work. I assume Drupal's .htaccess rules are conflicting. What rules should I write Drupal's .htaccess to enable the CodeIgniter rewriting rules?
Many thanks
EDIT: Solution is, immediately after the RewriteEngine on rule in Drupal's .htaccess, I inserted
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^ci_site/(.*)$ ci_site/index.php/$1 [L]
Hopefully this helps anyone who has a similar setup.
Upvotes: 3
Views: 570
Reputation: 3488
Copy from the question. I landed here wanting to help somebody and, after reading the question, I saw the solution inside...
The solution is, immediately after the RewriteEngine on rule in Drupal's .htaccess, inserting
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^ci_site/(.*)$ ci_site/index.php/$1 [L]
Upvotes: 1