Answer the question
In order to leave comments, you need to log in
Rewrite but not normal?
Good afternoon.
There is a need to implement such functionality on CodeIgniter
Imagine there is a controller - partner
class Partner extends CI_Controller {<br>
function page($partnerName,$method = 'main'){<br>
echo $this->$method($partnerName);<br>
}<br><br>
function main($partnerName){<br>
//выводит view<br>
}<br><br>
function contacts($partnerName){<br>
//выводит view<br>
}<br><br>
}<br>
Answer the question
In order to leave comments, you need to log in
try like this:
server {
server_name ~^(www\.)?(?<PARTNER>.+)\.site\.com$;
rewrite ^/(.*)$ http\://site\.com/partner/page/$PARTNER/$1 last;
return 403;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question