Welcome Guest, Not a member yet? Register   Sign In
PHP5.4.6 & Apache2.2.22 Issue ???!!!!!
#1

[eluser]Horvat[/eluser]
Recently I installed Ubuntu 12.10(64bit)on my pc, and i have a problem with loading FW webpages,
if there some concrete php file it will load it.

BUT, if its from (for example: CodeIginter FW)

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Site extends CI_Controller {

  function __construct() {
    parent::__construct();
  }

  public function index() {
    $data["content"] = "site/index_view";
    $this->load->view("template/layout", $data);
  }

  public function other() {
    $data["content"] = "site/other_view";
    $this->load->view("template/layout", $data);
  }

}

if I Put http://localhost/CodeIgniter_Test/CodeIg...site/index or http://localhost/CodeIgniter_Test/CodeIg...site/other I have 404 error, WHY IS PHP NOT WORKING RIGHT??!?!?!
#2

[eluser]Aken[/eluser]
If you didn't implement an .htaccess file to rewrite your URLs, your examples would be located at http://localhost/CodeIgniter_Test/CodeIg...-skeleton/index.php/site/index

Read the user guide about how the URLs work.
#3

[eluser]Horvat[/eluser]
I have implementened before .htaccess in root

Code:
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php/$1 [L]

Maybe i need to change permission for .htaccess, is it possible that apache don't see it?
#4

[eluser]Aken[/eluser]
You'll probably need a RewriteBase option that specifies the subfolder that your CI installation is in. I bet if you go to the URL I mentioned with index.php it works fine (which means it's a rewrite issue in your .htaccess).
#5

[eluser]Horvat[/eluser]
Yes you're right, but how to fix my 'rewrite issue in your .htaccess'
#6

[eluser]Aken[/eluser]
[quote author="Aken" date="1359684617"]You'll probably need a RewriteBase option that specifies the subfolder that your CI installation is in.[/quote]




Theme © iAndrew 2016 - Forum software by © MyBB