Welcome Guest, Not a member yet? Register   Sign In
Newbie's stupid routing problem
#1

[eluser]pernavoi[/eluser]
I have CI system folder in public_html root folder.
I have .htaccess copied from CI user guide
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
I have set base_url in config.php to "http://www.mydoiman.com/"
I can't access anything from public_html root directory with direct address
for example trying to access http://www.mydoiman.com/test.txt gives CI's 404 error page. (And yes that file exists in public_html folder).
This must be some config error somewhere but where?

I am trying to load my CSS-files from mydoiman.com/css/ -directory but can't access them. Have tried also with url helper <?=base_url()?>


EDIT: Solved this with few changes to .htaccess
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|system|images|css|js)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteRule ^(images|css|js)/(.*) /system/application/views/$1/$2 [L]
Now I can access css, image and js -files with following urls:
/css/style.css
/images/image.jpg
/js/

And those folders are located under /system/application/views/


Messages In This Thread
Newbie's stupid routing problem - by El Forum - 11-13-2010, 09:00 AM
Newbie's stupid routing problem - by El Forum - 11-13-2010, 09:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB