Hello all,
I am making use of Codeigniter and I currently have this URL format setup:
http://example.com/view/
I would like to put in the logged in users username in the URL and remove the view part of the URL. The view is my controller. So I can have something that looks like this in the address bar:
http://example.com/johnny
However, I firstly tried removing the view part using my htaccess file like so:
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|images|css|js|swfupload|uploads|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA]
#trying to remove view??
RewriteRule ^(.*)$ view.php/$1 [QSA]
But this resulted in a 403 (forbidden) error as I have just corrupted the URL requested!
How can I best achieve this? Maybe making use of Codeigniter's routes?
Thank you all for any help.