So the title of the question was a little difficult to come up with. Here’s the deal, the CI3 install is like this: www.mydomain.com.au/apps/TGPS where TGPS is the CI application. Additionally, on the root of the web folder there is a WordPress install. My question is, what is the .htaccess setup that I need to compress the URLs from:
www.domain.com/apps/TGPS/index.php/controller/function
to this:
www.domain.com/apps/TGPS/controller/function
At present I have this:
The top level .htacess is this:
# BEGIN WordPress
RewriteRule ^/apps($|/) - [L]
# END WordPress
The .htaccess in TGPS is this:
<IfModule mod_rewrite.c>
RewriteEngine On
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#This last condition enables access to the images and css folders, and the robots.txt file
RewriteCond $1 !^(index.php|public|images|robots.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
and the .htaccess in application is the standard one.
Seems everything I try either breaks WordPress, CodeIgniter or has no effect. Any help would be appreciated.
At first glance, you’re missing a rewrite base:
Try bellow code
Then the www to non-www: