Face problem to access css file and enable mod_write

i’m start working with codeigniter. keep images and css folder into system folder and my page layout works fine. Suddenly I download ci_sample file and find .htaccess file within it. Just for curisity I copy it and paste within my system folder. Then wana browse my existing completed pages to see the effect-but it gives server error like below:
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
127.0.0.1
04/17/08 20:58:48
Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.3
———————————
To solve the problem
To solve css file find problem:
open httpd.conf file from conf folder
and enable this line #LoadModule rewrite_module modules/mod_rewrite.so to

LoadModule rewrite_module modules/mod_rewrite.so
and restart apache.

Then give error message “unable to redirect page”.
So I have to open the .htaccess file and replace the existing code with new code:
existing code-

RewriteEngine on
RewriteRule ^$ /index.php [L]
RewriteCond $1 !^(index\.php|img|css|js|video_files|robots\.txt|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]

replace new code:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1″


now mod_write enable and apache works fine

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: