Welcome Guest, Not a member yet? Register   Sign In
[RESOLVED] 404 on production

(This post was last modified: 08-23-2015, 12:19 PM by maxime59.)

Hi at all,

Looks like it's a recurrent issue but I still can't solve it so this is my story :

- Project on development environment works well, routes defined without the index.php in it.
- Migration on "production" and 404 error when index.php not used !
--> I can't access to my pages without index.php in the URI whereas in development it worked normally.

Not Found

The requested URL /dashboard was not found on this server.
Apache/2.2.15 (CentOS) Server at prod.grm.com Port 80

Module_rewrite is right there (checked with phpinfo())
My Controllers and Models are written with a first Capital letter.
I changed the config['base_url'] with the the production one

--> Also, the homepage works with default controller set but after it's 404..

Htaccess problem ?

I can't get it why so much difference between development and "prod".



(This post was last modified: 08-22-2015, 10:13 PM by phplaw.)

The problem because of htaccess has wrong config, open your htaccess file, then add this ./ before index.php/$1 to resolve your problem.
After add that the line look like this:


It seems that adding the './' before index.php/$1 doesn't work as I still have 404..

This is my final htaccess file :

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

After add './' , please remove this line
RewriteBase /
then It will work.


I finally found that the problem came from my httpd.conf file, add to change the AllowOverride All in <Directory "/var/www/html">

Found here : http://stackoverflow.com/questions/20710...-on-centos

Thanks for the help

Dude, some how you guy put out the wheels on your car then trying to drive It to the store =))

Theme © iAndrew 2016 - Forum software by © MyBB