Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 3 & HMVC .htaccess issues
#1

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
Reply
#2

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

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
Reply




Theme © iAndrew 2016 - Forum software by © MyBB