문제

Current I have URL www.site.com/mauritius/className/function/id. I have managed to remove index.php using .htaccess.

Now I want to remove function segment from URL. I want to make above URL www.site.com/mauritius/className/id. Just don't want 'function' in URL for only one function.

도움이 되었습니까?

해결책

set your route in config/routes.php

$route['alias'] = 'controller/method';

or rewrite url using .htaccess

i am not check this but you can try like

RewriteRule ^controller/([a-z0-9A-Z]+)/?$ controller/function/$1 [L,QSA]

For more :- http://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top