Welcome Guest, Not a member yet? Register   Sign In
PHP5, mod_rewrite (on Lunar Pages)
#1

[eluser]antiver[/eluser]
I developed a CI app on PHP 5, using mod_rewrite. And then I moved to a server (hosted by Lunar Pages) using PHP 4, and mod_rewrite. Everything worked fine until I added the following two lines to the .htaccess file to switch to PHP 5, and now I'm getting errors from Firefox that the site isn't redirecting properly.

Code:
AddHandler application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml
AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml

Removing the mod_rewrite stuff (copied straight from the CI wiki) and adding "index.php" back to $config['index_page'] fixes the problem, but unfortunately the site 100% needs mod_rewrite AND PHP 5.

I can't figure out how to get the two to play nice together. Any suggestions are welcome!
#2

[eluser]Pascal Kriete[/eluser]
What's your mod-rewrite code and where is your app in relation to your webroot?
#3

[eluser]antiver[/eluser]
http://codeigniter.com/wiki/mod_rewrite/

CI's index.php is located in the web root folder, and system folder is as well.
#4

[eluser]Pascal Kriete[/eluser]
Hmm, odd. I don't really understand those 2 lines, seems to me like all it should need is:
Code:
AddHandler application/x-httpd-php5 .php




Theme © iAndrew 2016 - Forum software by © MyBB