Rob Bonner
Rob Bonner

Reputation: 9412

Have CodeIgniter ignore a file

Is there a way to have codeIgniter ignore a HTML file in the CI root directory. I am working on some jQuery ajax and the html file has to be in the same directory.

Upvotes: 0

Views: 81

Answers (2)

Adrian Gonzales
Adrian Gonzales

Reputation: 1010

Can you clarify "ignore"? If you have a root set up like:

/system
.htaccess
index.php
somefile.html

CI will ignore the somefile.html. If someone directly requests site.com/somefile.html, the server will serve the file. However, if you prevent that, jQuery cannot access it either.

Upvotes: 0

Jakub
Jakub

Reputation: 20475

Why not have the .html file be included by a view? Would work the same, and you would not be breaking the MVC model.

Upvotes: 1

Related Questions