Welcome Guest, Not a member yet? Register   Sign In
Hi from a begginer user of CI
#1

[eluser]Zorancho[/eluser]
Hi all, i just started coding with CI after mucking around with CakePHP, so i found CI much easier to use and extend it in a flexible way.
So, this is my problem:
I have my website on http://localhost:8888/website and using .htaccess file like this:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|js|css|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

I don't know what it really does, but it works for me. The only problem is that i have this kind of file structure: website folder is in www folder of the wamp directory and inside the website folder i have: system, images, css, js folders and .htaccess file from above.
When i go to an url in my address bar: http://localhost:8888/website/css i can get to the css file or to the images folder and js folder as well. How i can prevent direct access to those folders? I have been advised to use modification in httpd.conf file of apache, but some say that i should change the .htaccess file. I want to protect those folders since i am using the images folder for getting images for registered users on my website. And if i go to website/system i get message: Directory access is forbidden. How can i change this to when a user tries url that doesn't exist to be redirected to some existing site like the home site instead showing that error message?
Thanks in advance.
Zoran


Messages In This Thread
Hi from a begginer user of CI - by El Forum - 04-19-2009, 08:59 AM
Hi from a begginer user of CI - by El Forum - 04-19-2009, 09:42 AM
Hi from a begginer user of CI - by El Forum - 04-19-2009, 04:15 PM
Hi from a begginer user of CI - by El Forum - 04-19-2009, 07:56 PM
Hi from a begginer user of CI - by El Forum - 04-19-2009, 08:01 PM
Hi from a begginer user of CI - by El Forum - 04-20-2009, 02:25 AM
Hi from a begginer user of CI - by El Forum - 04-20-2009, 08:11 AM
Hi from a begginer user of CI - by El Forum - 04-20-2009, 11:05 AM
Hi from a begginer user of CI - by El Forum - 04-20-2009, 11:46 AM
Hi from a begginer user of CI - by El Forum - 04-20-2009, 11:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB