1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to give unique URL and page title on the pagination number of a page

Discussion in 'PHP' started by jimmy4feb, Jun 24, 2012.

  1. #1
    Hello DP members,

    Here is my problem which I am trying to solve. Any type of help will be appreciated.

    I have a website with many categories and when user clicks on any category link, the website is showing records in a table of that category with pagination links at the bottom.
    When user clicks on pagination links, he is reaching to URLs such as

    On pagination link 1: http://www.websitename.com?category_id=1&page_id=1

    On pagination link 2: http://www.websitename.com/category_id=1&page_id=2

    On pagination link 3: http://www.websitename.com/category_id=1&page_id=3

    The requirement is to create unique URLs for every page link present in the pagination such as

    On pagination link 1: http://www.websitename.com/text_page1_for_category.html

    On pagination link 2: http://www.websitename.com/text_page1_for_category.html

    On pagination link 3: http://www.websitename.com/text_page1_for_category.html

    Can please someone here guide me that how it can be possible.

    Is it possible by writing code only in PHP or I need to create new pagination table into MySql database to pull data and write PHP according to the data coming from database??

    Thanks,
    Jimmy
     
    jimmy4feb, Jun 24, 2012 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
  3. lampChamp

    lampChamp Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    What you are looking for is mod_rewrite. You would need to alter your PHP code slightly (just the target of the links), and have Apache accept those custom URLs.
     
    lampChamp, Jun 24, 2012 IP
  4. mukunthan

    mukunthan Active Member

    Messages:
    237
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    mukunthan, Jun 26, 2012 IP