tags:

views:

52

answers:

2

Hi all I want to serve some static html pages in codeigniter context. I dont want to bypass the index.php file in the base_url. But when I user the call to the HTML file, it dispays the 404 error page. I appreciate any help for this topic from guys who already solving this problem . Thanks for all in advance

I want to precise this elements: 1) my real problem is to serve PDF file for users to display in the browser only an not to save the PDF file. So I convert the PDF to HTML Files. The output is a directory with HTML files linked betwen them and ther images/button, CSS, js for navigation 2) when i put this HTML-OUTPUT in ci\Docs\HTML1 directory I can access it whith this URL localhost/ci/docs/html1/index.htm. But where i use localhost/ci/index.php/docs/html1/index.htm I get A 404 error page. 3) So I moved The HMLT1 directory to the Application\views directory And i stil have the same error My .htacces look like this:

RewriteEngine on RewriteCond $1 !^(index.php|resources|robots.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA]

Thanks Guys for your help

A: 

Create the static HTML file as a view and then just load the view:

$this->load->view('static.html');

You can then access this file as a normal controller. It all depends on how you have set up your .htaccess as well.

Kieran Andrews
fisrt, thanks for your answer.
Rachidh
I add the asked element in my question
Rachidh
A: 

I want to precise this elements: 1) my real problem is to serve PDF file for users to display in the browser only an not to save the PDF file. So I convert the PDF to HTML Files. The output is a directory with HTML files linked betwen them and ther images/button, CSS, js for navigation 2) when i put this HTML-OUTPUT in ci\Docs\HTML1 directory I can access it whith this URL localhost/ci/docs/html1/index.htm. But where i use localhost/ci/index.php/docs/html1/index.htm I get A 404 error page. 3) So I moved The HMLT1 directory to the Application\views directory And i stil have the same error My .htacces look like this:

RewriteEngine on RewriteCond $1 !^(index.php|resources|robots.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA]

Thanks Guys for your help

Rachidh