I have local site and in that site I have integrated wordpress + codeigniter.
Now I have a blog and custom query to fetch posts from wordpress database using wordpress wp_query
function, everything is working pagination is also working but I'm having a small issue that if I type my blog address without a trailing /
than the pagination doesn't work properly
1) When I use:
siteaddress/blog/
it works just fine and pagination also work like:
siteaddress/blog/page/1
siteaddress/blog/page/2
I can move forward and backward properly
Only problem came when I open url
siteaddress/blog
than the pagination url becomes
siteaddress/blogpage/1
siteaddress/blogpage/2
It means missing 1 trailing /
between blog and page so can I solve this issue using codeigntiers route? I already tried:
$route['blog'] = "blog/page/$1";
and
$route['blog'] = "blog/";
these both methods couldn't solve my problem.
Any help will be appreciated.
live version for my site is:
aws.chemfreecom.com/blog or aws.chemfreecom.com/blog/