Florian Müller
Florian Müller

Reputation: 7785

Handling routing with .htaccess

I've just learned a bit of CodeIgniter Framework and I saw something which I wondered a long time ago.

CodeIgniter handles Routing just as this:

http://mydomain.com/index.php/classname/function/parameter

Now I want to get this to work:

http://mydomain.com/classname/function/parameter

Is it somehow possible to get the webserver to not check for the directories but to forward those parameters to mydomain.com/index.php? Is this somehow realizable by .htaccess or something?

Thank you for help!

Upvotes: 0

Views: 86

Answers (1)

Pramod Kumar Sharma
Pramod Kumar Sharma

Reputation: 8012

Here is the help regarding this http://codeigniter.com/user_guide/general/urls.html

or Place

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

in your .htaccess

Upvotes: 1

Related Questions