[英]How to change codeigniter post permalink as WordPress
This is is the current Blog Post Details URL. 这是当前的Blog Post Details URL。
site.com/blog/details/this-is-a-blog-post
But, I want my Blog Post URL like this. 但是,我想要这样的Blog Post URL。
site.com/blog/this-is-a-blog-post
I'm using CodeIgniter framework right now. 我现在正在使用CodeIgniter框架。 Is there any way to do this in CI by anyway? 无论如何,在CI中有没有办法做到这一点?
Thank you. 谢谢。
I solved the problem using Codeigniter Routes. 我使用Codeigniter路线解决了问题。 I added a new route to application/config/routes.php $route['blog/(:any)'] = "blog/details/$1"; 我在application / config / routes.php中添加了一条新路由$ route ['blog /(:any)'] =“ blog / details / $ 1”;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.