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

(02-26-2017, 02:28 PM)baxterheinen Wrote:
(02-26-2017, 08:46 AM)ignitedcms Wrote: Daft question but does mod rewrite work on your hosting. That would be the first thing to look at. Sadly configuring the htaccess for different environments is pretty hit or miss. Just keep trying different configurations.

Yes, wordpress and CI both work independently in different directories.

Are you sure about that? The structure you originally posted has Codeigniter as a subdirectory within WordPress. That means that /codeigniter/auth/login is routing through the .htaccess rule for WordPress most likely. It seems really simple to me. On your WordPress .htaccess, you would add:

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

Any URI starting with codeigniter won't be processed in that first RewriteCond. I left it in parathensis incase additional items have to be added similar in the CodeIgniter .htaccess.

The reason using codeigniter/index.php works is because of that !-f in the second RewriteCond which means the condition is true if the request is not a file. The following is if the request is not a directory.

Messages In This Thread
RE: .htaccess issues with CI3 inside Wordpress directory - by xenomorph1030 - 04-18-2017, 08:17 AM

Theme © iAndrew 2016 - Forum software by © MyBB