Welcome Guest, Not a member yet? Register   Sign In
CSS Problem Solved!!!!!!!!
#11

(06-01-2017, 11:54 AM)shaser Wrote:
(06-01-2017, 11:41 AM)Paradinight Wrote:
(06-01-2017, 11:32 AM)shaser Wrote: Thanks Guys

Smile

put the file back. the file protect your folders in application from direct access :|

put the css folder above the application or use the folder structure i showed to you

it is above application folder this is the address ../application/css/file.css but if I put htaccess file back don't work.

Sad

/application/css/file.css to /css/file.css
Reply
#12

(06-01-2017, 11:59 AM)Paradinight Wrote:
(06-01-2017, 11:54 AM)shaser Wrote:
(06-01-2017, 11:41 AM)Paradinight Wrote:
(06-01-2017, 11:32 AM)shaser Wrote: Thanks Guys

Smile

put the file back. the file protect your folders in application from direct access :|

put the css folder above the application or use the folder structure i showed to you

it is above application folder this is the address ../application/css/file.css but if I put htaccess file back don't work.

Sad

/application/css/file.css  to /css/file.css

is this safe?

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|css|images|robots\.txt)
RewriteRule ^(.*)$ ./index.php/$1 [L]

for the htaccess file?
Reply
#13

(06-01-2017, 12:09 PM)shaser Wrote:
(06-01-2017, 11:59 AM)Paradinight Wrote:
(06-01-2017, 11:54 AM)shaser Wrote:
(06-01-2017, 11:41 AM)Paradinight Wrote:
(06-01-2017, 11:32 AM)shaser Wrote: Thanks Guys

Smile

put the file back. the file protect your folders in application from direct access :|

put the css folder above the application or use the folder structure i showed to you

it is above application folder this is the address ../application/css/file.css but if I put htaccess file back don't work.

Sad

/application/css/file.css  to /css/file.css

is this safe?

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|css|images|robots\.txt)
RewriteRule ^(.*)$ ./index.php/$1 [L]

for the htaccess file?

Why not

- application
- system
- css

?
Reply
#14

There is a reason to not put public files into applications folder: SECURITY!

You HAVE to put all public files (image, css, js etc) outside applications folder ,this is the CodeIgniter's pattern.

Use this structure:

Code:
/application
/system
/css/generalstyle.css
index.php


Then you can use something like:


Code:
<link rel = "stylesheet" href = "<?php echo base_url('/css/generalstyle.css'); ?>" >
Reply
#15

This the CodeIgniter directory structure that I use on my websites.
You need to edit index.php to tell it where to find the ./application
and ./system folders.

[Image: directory-structure.png]
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#16

I also use file structure from InsiteFX. Its not the standard one you get when you download CI but it is far more secure.
Only have the public files in the folder public_html (sometimes called htdocs or public).
Everything else should be outsite(above) of docroot to keep if save.

As InsiteFX said you need to change the index.php to something like this:
$system_path = '../system';
$application_folder = '../application';
On the package it said needs Windows 7 or better. So I installed Linux.
Reply
#17

(06-01-2017, 09:49 PM)elieldepaula Wrote: There is a reason to not put public files into applications folder: SECURITY!

You HAVE to put all public files (image, css, js etc) outside applications folder ,this is the CodeIgniter's pattern.

Use this structure:

Code:
/application
/system
/css/generalstyle.css
index.php


Then you can use something like:


Code:
<link rel = "stylesheet" href = "<?php echo base_url('/css/generalstyle.css'); ?>" >
  Thanks work Perfect!!!!!!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB