Welcome Guest, Not a member yet? Register   Sign In
URL Rewriting doesn't work anymore (codeigniter 2.0 official release)
#3

[eluser]DarKDinDoN[/eluser]
Thanks ! Actually, I noticed that it depends of the server (local or live) ...
And I haven't fix my problem yet ...

Two very simple examples :

________________________________________________________

1. I copy the content of the CI 2.0 zip in the local server folder and in the web server root. I do nothing else (I mean absolutly nothing ...) and i run :

Code:
//For the local server
http://localhost/ -----> OK
http://localhost/index.php/ -----> OK
http://localhost/index.php/welcome/ -----> OK
http://localhost/index.php/wrong_controller_must_fail -----> OK show CI 404

//For the live server
http://www.example.com/ -----> OK
http://www.example.com/index.php/ -----> OK
http://www.example.com/index.php/welcome/ -----> OK
http://www.example.com/index.php/wrong_controller_must_fail -----> Failed to show the CI 404

-> Local server : nothing wrong.
-> Live server : always display the main controller even when it must fail and call the 404 ...

2. For the second example I set the 'index_page' var to :

Code:
$config['index_page'] = '';

And add this '.htaccess' file to the root :

Code:
RewriteEngine On

RewriteBase /

RewriteCond $1 !^(index\.php)
RewriteRule ^foo/(.*)$ /index.php/$1 [L]

and i run :
Code:
//For the local server
http://localhost/foo/ -----> FAIL CI 404
http://localhost/foo/welcome/ -----> FAIL CI 404
http://localhost/foo/wrong_controller_must_fail -----> OK but certainly not cause of the wrong parameter

//For the live server
http://www.example.com/foo/ -----> OK
http://www.example.com/foo/welcome/ -----> OK
http://www.example.com/index.php/wrong_controller_must_fail -----> Failed to show the CI 404

-> Local server : Always show the CI 404.
-> Live server : always display the main controller even when it must fail and call the 404 ...

________________________________________________________


I never had these issues with the 2.0 CI DEV. So what the ... ? Did I miss something ?


Messages In This Thread
URL Rewriting doesn't work anymore (codeigniter 2.0 official release) - by El Forum - 01-28-2011, 08:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB