Welcome Guest, Not a member yet? Register   Sign In
remove index.php bug
#1

[eluser]Le Bang[/eluser]
Quote:RewriteEngine on
RewriteCond $1 !^(images|css|upload|js|index\.php)
RewriteRule ^(.*)$ index.php/$1 [L]

before remove index.php link is:
http://domain.com/index.php/css

worked

but after remove index.php
http://domain.com/css

not work. error 404 Sad(

Help me.
#2

[eluser]Dam1an[/eluser]
Your css files shouldn't be routed through mod_rewrite anyway (in the condition, you state anything other then css, images, js etc)

You should access your css using base_url().css/style.css
#3

[eluser]Le Bang[/eluser]
no. do not that.

after remove index.php

http://domain.com/abc
http://domain.com/xyz

workded. but segment(1) like css% not work.

ex:

http://domain.com/cssxyz
http://domain.com/jsabc
not work.

I think mod Rewrite will reWrite all segment like css+something, js+something.

help
#4

[eluser]Dam1an[/eluser]
Sorry, misunderstood what was going on, but get it now

Try making your rewrite condition more specific
Code:
RewriteEngine on
RewriteCond $1 !^(images|\.css|upload|js|index\.php)
RewriteRule ^(.*)$ index.php/$1 [L]

Now it will not use the index.php if the URI has .css (aka the extension) instead of a controller containing css




Theme © iAndrew 2016 - Forum software by © MyBB