Nikul Panchal
Nikul Panchal

Reputation: 711

How to add username in URL with htaccess or with codeigniter

I want to add username just after domain in URL, It should have to look like this http://xx12.com/username/gallery, Can anyone please help me to resolve this issue ? Any help will be really appreciated.

Upvotes: 0

Views: 36

Answers (1)

failedCoder
failedCoder

Reputation: 1424

You can register a route that accepts username as an argument like this:

$route['(:any)/gallery'] = 'YourController/YourMethod';

Upvotes: 1

Related Questions