rewrite rule for codeigniter
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-05-20T12:35:05Z
Indexed on
2010/05/20
18:10 UTC
Read the original article
Hit count: 269
this is my controller in CI
class Welcome extends Controller {
function Welcome()
{
parent::Controller();
}
function index()
{
}
function bil($model='')
{ }
I want to do a rewrite so that
http://example.com/index.php/welcome/bil/model
becomes
http://example.com/model
in my htaccess I have
RewriteBase /
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/welcome/$1 [L]
#RewriteRule ^(.*)$ /index.php/welcome/bil/$1 [L]
I thought it should be as easy as removing the /index.php/welcome/ part but when I uncomment the last line it get 500 internal server error
© Stack Overflow or respective owner