Hello!

The circumstances are such that I have to ask you for help.

There is an address: http://site.com/profile/$username$/requests/

Actually you need to get:

  • If after username there are requests
  • If there is nothing after username

Then it all goes into routing , so you need $ 1 :)

For the second, where you need to check if there are any requests, it turned out like this:

 $route['profile/(.*)/([requests]+)'] = "profile/requests/$1"; 

I would be happy to help.
thank

    1 answer 1

    In general, split (/ \ //) is enough here, but if you need regexp somehow, for example, like this:

     m|profile/(.+?)/?(.+)?$| 
    • Thanks you. I will study. - eSees