CodeIgniter Forums
Codeigniter 3 & HMVC .htaccess issues - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: Codeigniter 3 & HMVC .htaccess issues (/showthread.php?tid=62330)



Codeigniter 3 & HMVC .htaccess issues - mattnewark - 07-03-2015

Hi,

Not sure what  am doing wrong or it is an issue with the version that I have downloaded recently of codeigniter but I am using the below code on another site that is running CI3 and the index.php is being removed without an issue on the same hosting:

Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]

I have noticed that the version I downloaded a few days ago does have the composer file available which was not present in the version before, not sure if this will make a difference.  When I click on a link I get this error:

The requested URL /home/sites/parkestatewine.co.uk/public_html/index.php was not found on this server.

and when I add the index.php to the URL it works fine so it is either the .htaccess file not working or the code I have above is missing something or the CI team have changed something that is causing this.

If you want to have a look at what I am dong to see if you can see an issue the link is below:

http://79.170.44.106/parkestatewine.co.uk/

If you need anymore information just ask as i really need this resolving.

Thanks

Matt


RE: Codeigniter 3 & HMVC .htaccess issues - mwhitney - 07-06-2015

Any particular reason the last RewriteRule uses ^(.+)$ instead of ^(.*)$ ?


RE: Codeigniter 3 & HMVC .htaccess issues - mattnewark - 07-06-2015

Hi,

Thanks for the reply, I have resolved this. I have also changed the + to a * but this was not the issue. I worked out that as I was using a domain reference the .Htaccess didn't allow for the server IP address at the beginning.

All working now.

Thanks