.htaccess - CSS is not working in my CodeIgniter Project, But why? -


my project directory @ server address : ci.xyz.com/ci/h/  used on codeigniter project:  $config['base_url'] = './'; $config['index_page'] = '';//index.php 

route as:

$route['default_controller'] = "home/index/"; 

htaccess

<ifmodule mod_rewrite.c>  rewriteengine on  rewritebase /ci/h/  rewritecond %{request_uri} ^system.*  rewriterule ^(.*)$ /index.php?/$1 [l]  rewritecond %{request_uri} ^application.*  rewriterule ^(.*)$ /index.php?/$1 [l]  rewritecond %{request_filename} !-f  rewritecond %{request_filename} !-d  rewriterule ^(.*)$ index.php?/$1 [l] 

<ifmodule !mod_rewrite.c>    errordocument 404 /index.php </ifmodule>   

when index function of home (from route default controller) loaded resources working. when click link (such home/aboutus) resources not working display text. used link echo base_url('home/aboutus'); , resoureces echo base_url('assets/theme/css/style.css');

what wrong ? suggest me problem ?

i’d recommend using sub domain e.g http://ci.xyz.com set $route['default_controller'] = "home/index/"; $route['default_controller'] = "home";

open application/config/config.php , set base_url $config['base_url'] = 'http://ci.xyz.com/'; // not forget forward slash @ end change root/.htaccess

<ifmodule mod_rewrite.c>  rewriteengine on  rewritebase /  rewritecond %{request_uri} ^system.*  rewriterule ^(.*)$ /index.php?/$1 [l]  rewritecond %{request_uri} ^application.*  rewriterule ^(.*)$ /index.php?/$1 [l]  rewritecond %{request_filename} !-f  rewritecond %{request_filename} !-d  rewriterule ^(.*)$ index.php?/$1 [l]  </ifmodule>  <ifmodule !mod_rewrite.c>  errordocument 404 /index.php  </ifmodule>

to link css files in root/assets folder use assets/theme/css/style.css


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -