• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
.htacces did not work with CI 1.7.2 an php 5.3

#1
[eluser]joytopia[/eluser]
Hi all,

I tried to hide the index.php with .htacces, CI 1.7.2 and php 5.3 and got an error 404.
After downgradig to php 5.2.9 it worked properly (php 5.2.11 did not work too).

Anybody else had this issue?

Thanks and best regards

Bernd

#2
[eluser]enSo[/eluser]
yeah, I'm getting a HTTP 500 error when adding this to the .htaccess file:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

#3
[eluser]skunkbad[/eluser]
I have my .htaccess working on 5.2.11. It's not CI. There'd be plenty of people using php 5.3 that can tell you their site is working fine too.

Check that you can use .htaccess and that mod_rewrite is enabled.
Check your config/config and tweak settings if necessary.

#4
[eluser]enSo[/eluser]
what could it be then? any ideas?

#5
[eluser]skunkbad[/eluser]
Trying checking the URI_PROTOCOL in config/config:

Code:
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'            Default - auto detects
| 'PATH_INFO'        Uses the PATH_INFO
| 'QUERY_STRING'    Uses the QUERY_STRING
| 'REQUEST_URI'        Uses the REQUEST_URI
| 'ORIG_PATH_INFO'    Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol']    = "AUTO";

Also verify that all settings in config/config and index.php are accurate.

#6
[eluser]enSo[/eluser]
ok, now I got it working by uncommenting this line from httpd.conf

LoadModule rewrite_module modules/mod_rewrite.so

But now whenever I go to one of my links, it gets to the wampserver index page.
Any idea why that happens?

#7
[eluser]joytopia[/eluser]
I made a new installation of CI 1.7.2 with exactly the recommended .htacces

I kept
Code:
$config['uri_protocol']    = "AUTO";
and all other default values.


With up to php 5.2.9 it works. With higher releases it does not.

Does anybody has this – I think normal – combination running with php 5.3?

Thanks and best regards
Bernd

#8
[eluser]enSo[/eluser]
I can use it, the urls work, but they all show the main page - any idea why that happens? I use the script from the user guide :|

#9
[eluser]joytopia[/eluser]
Now I got it working:

First I had the .htacces from the user guide, which did not work.

Now I found the article in the wiki:
http://codeigniter.com/wiki/mod_rewrite/

This works fine.

Thanks
Bernd

#10
[eluser]enSo[/eluser]
[quote author="joytopia" date="1260975194"]Now I got it working:

First I had the .htacces from the user guide, which did not work.

Now I found the article in the wiki:
http://codeigniter.com/wiki/mod_rewrite/

This works fine.

Thanks
Bernd[/quote]

Ah thanks, that worked like a charm. You guys should change that code in the user guide Big Grin


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.