I need to change
http://mysite.com/profile?username=nick
to
http://mysite.com/user/nick
with CodeIgniter routing. I add the following line to routes.php
but it doesn't work:
$route['user/(:any)'] = "profile?username=$1";
Here is the .htaccess
file that I use:
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
AddDefaultCharset utf-8
How can I solve this problem? Thanks in advance.
EDIT:
I mean URL structure changing. So after the routing it must redirect
http://mysite.com/user/nick
to
http://mysite.com/profile?username=nick