CodeIgniter Forums
.htacces did not work with CI 1.7.2 an php 5.3 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: .htacces did not work with CI 1.7.2 an php 5.3 (/thread-24332.html)

Pages: 1 2


.htacces did not work with CI 1.7.2 an php 5.3 - El Forum - 11-06-2009

[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


.htacces did not work with CI 1.7.2 an php 5.3 - El Forum - 11-06-2009

[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]


.htacces did not work with CI 1.7.2 an php 5.3 - El Forum - 11-06-2009

[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.


.htacces did not work with CI 1.7.2 an php 5.3 - El Forum - 11-06-2009

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


.htacces did not work with CI 1.7.2 an php 5.3 - El Forum - 11-06-2009

[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.


.htacces did not work with CI 1.7.2 an php 5.3 - El Forum - 11-07-2009

[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?


.htacces did not work with CI 1.7.2 an php 5.3 - El Forum - 11-07-2009

[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


.htacces did not work with CI 1.7.2 an php 5.3 - El Forum - 11-18-2009

[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 :|


.htacces did not work with CI 1.7.2 an php 5.3 - El Forum - 12-16-2009

[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


.htacces did not work with CI 1.7.2 an php 5.3 - El Forum - 12-16-2009

[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