Welcome Guest, Not a member yet? Register   Sign In
.htaccess issues with CI3 inside Wordpress directory
#1

I have Wordpress installed in my web root and also have a directory inside that web root with Codeigniter 3 installed. 


Code:
/www
      /wp-admin
      /wp-content
      /wp-includes
      ...
     /codeigniter


When I visit a default controller method like 


Code:
http://mydomain.com/codeigniter 


I can see my login page (codeigniter/auth/index). 

But I i visit anything beyond that, such as 


Code:
/codeigniter/auth/login 


I get a 404 error in the javascript console and the error "No input file specified" in the browser.  

My Wordpress .htaccess:


Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


My Codeigniter .htaccess:


Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>


I have tried everything, how do I make this work?

If I add index.php back into my URL it works, but of course i don't want that. 

So http://mydomain.com/codeigniter/index.php/auth/login works but
http://mydomain.com/codeigniter/auth/login does not work. How do I enforce
the no index.php version (that works if CI is in it's own directory) while inside
a WP directory?

I have tried this, no luck.

Wordpress:


Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


Codeigniter:


Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|portal|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
Reply


Messages In This Thread
.htaccess issues with CI3 inside Wordpress directory - by baxterheinen - 02-26-2017, 02:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB