Welcome Guest, Not a member yet? Register   Sign In
Restricting direct access to your view-files?
#7

[eluser]helmutbjorg[/eluser]
Just stick the following line in the top of your view files:

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

And to stop people browsing to the directoy simply place a index.html file in the views folder with the following code:

Code:
<html>
<head>
    <title>403 Forbidden</title>
</head>
<body>

<p>Directory access is forbidden.</p>

&lt;/body&gt;
&lt;/html&gt;


Messages In This Thread
Restricting direct access to your view-files? - by El Forum - 03-04-2010, 05:03 PM
Restricting direct access to your view-files? - by El Forum - 03-04-2010, 06:03 PM
Restricting direct access to your view-files? - by El Forum - 03-04-2010, 06:15 PM
Restricting direct access to your view-files? - by El Forum - 03-05-2010, 12:46 AM
Restricting direct access to your view-files? - by El Forum - 03-05-2010, 01:41 AM
Restricting direct access to your view-files? - by El Forum - 03-05-2010, 02:28 AM
Restricting direct access to your view-files? - by El Forum - 03-05-2010, 09:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB