php - mod_rewrite and pagination with form get method -
php - mod_rewrite and pagination with form get method -
im using mod_rewrite , pagination, , form method. having issues.
.htaccess code is:
rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^articles-author/([a-za-z0-9_-]+)&page=([0-9]+)/?$ articles.php?slug=$1&page=$2 [l,nc]
which looks like: http://www.example.com/articles-author/nelson&page=2
works fine without issue pagination going 1st page or other page.
but when seek nelson?page=2
shows first page instead of showing 2nd or other page. can u please help me in issue.
in same page have custom page number field using form user can go desired page no entering in field, form given below.
<form action='' method='get' > <input type='text' border='0' name='page' value='$page'> / $lastpage <input type='submit' class='small color' value=' go '> </form>
when come in , nail go
if url
this: http://www.example.com/articles-author/nelson&page=2
become this: http://www.example.com/articles-author/nelson&page=2?page=1
after hitting go
can u please tell me how prepare these issues????
php apache .htaccess mod-rewrite
Comments
Post a Comment