My .htaccess works, but not with CI |
[eluser]dejavu[/eluser]
This is a strange one. Using index.php in the URL works, e.g http://dev.seeyou.com/index.php/staff (this is not the actual site) My .htaccess works perfectly on an XAMPP install: Code: RewriteEngine on To test if .htaccess was working, I created test.php. In test.php, I'm simply var_dump-ing $_SERVER, Code: <pre><?php But if I comment out test.php and uncomment index.php, it keeps taking me to the "Welcome to CodeIgniter" page. Any idea why this would be working on one server and not another? Thanks! (Var dump of $_SERVER) Code: array(37) {
[eluser]Ben Edmunds[/eluser]
What kind of server is this not working on? Did you change your config.php settings properly?
[eluser]dejavu[/eluser]
CentOS. I think my config is correct because CI works fine with index.php, just acts clueless without it. Like it can't see the PHP_SELF string or whatever is used to find out where to call the controller.
[eluser]wiredesignz[/eluser]
[quote author="dejavu" date="1258009941"]... clueless ... Like it can't see the ... whatever is used to find out where to call the controller.[/quote] Look at your $_SERVER dump and set $config['uri_protocol'] appropriately.
[eluser]dejavu[/eluser]
Thanks buddy! That wasn't the problem, but the next config option down fixed it: Code: |-------------------------------------------------------------------------- It was using QUERY_STRING, which as you can see above is the one URI/path value that's returning as empty. |
Welcome Guest, Not a member yet? Register Sign In |