Part of the EllisLab Network
   
 
Simply can’t get .htacces to work..
Posted: 13 July 2008 10:58 AM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  11
Joined  07-09-2008

Heya,

I’ve been trying every .htacces example availible on the forums and tried them all but still I can’t get my images to work but my css on the other hand works rather fine (some small problem with body).

My build.

- Ci Folder
   
- system
       
- application and all that.
   -
assets
       
- images
       
- css
       
- js


When linking from within a view file I use
/assets/images/imagehere.png

And exactly the same with my Css but my css work partially when linking this way.
/assets/css/stylehere.css

The current .htaccess file I ended up with so my http://ci.mysite.com/ works without errors displaying is—>

<IfModule mod_rewrite.c>
    
RewriteEngine On
    RewriteCond
%{REQUEST_FILENAME} !-f
    RewriteCond
%{REQUEST_FILENAME} !-d
    RewriteRule
^(.*)$ /index.php/$1 [L]
</IfModule>

But I really don’t get why this should be such a big problem I just want it to work :(
And I don’t want to end up hard coding all the links :/


Best Regards
Kasper

Profile
 
 
Posted: 13 July 2008 11:01 AM   [ Ignore ]   [ # 1 ]  
Summer Student
Avatar
Total Posts:  7
Joined  07-13-2008

Use something like this:

RewriteEngine on
RewriteCond
$1 !^(index\.php|assets)
RewriteRule ^(.*)$ /index.php/$1 [L]

Profile
 
 
Posted: 13 July 2008 11:17 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Avatar
Total Posts:  11
Joined  07-09-2008

Hmm works now but then I got following errors

Severity: Notice
Message: Undefined offset: 0
Filename: libraries/Router.php
Line Number: 190
Line Number: 196
Line Number: 199

And when looking at theese lines I find nothing special :(
Its just the original one.

Profile
 
 
Posted: 18 July 2008 05:57 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  3
Joined  05-23-2008

Having those exact same errors Buch. Any luck resolving this?

EDIT: managed to get it working properly with no errors by using “Solution 2” from http://codeigniter.com/wiki/Dreamhost_.htaccess/

Profile
 
 
Posted: 19 July 2008 07:13 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Avatar
Total Posts:  11
Joined  07-09-2008

Ahhh great nice thanks smile

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 62661 Total Logged-in Users: 36
Total Topics: 77197 Total Anonymous Users: 0
Total Replies: 416734 Total Guests: 234
Total Posts: 493931    
Members ( View Memberlist )