Results 1 to 10 of 10
  1. #1
    Join Date
    May 2008
    Posts
    78

    quick question for page links

    i have a site im working on and i cant seem to get it to change pages with the links it says it changed the page but it dont, it just seems to re show the same page.
    a friend told me that its calling values instead of pages and that the pages might need anchors.
    my files for ea catagory goes like this
    say for cars
    index.html
    index.html?page=1
    index.html?page=2
    index.html?page=3

    and ea page has different pics listed in the code so i just cant seem to figure out why its not actually changing pages.
    i will reply with a page of code for the links
    thanks for looking

  2. #2
    Join Date
    May 2008
    Posts
    78

    Heres my page link code

    <div class="pagination">

    <span class="pag_ap">1</span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=2">2</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=3">3</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=4">4</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=5">5</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=6">6</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=7">7</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=8">8</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=9">9</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=10">10</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=11">11</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=12">12</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=13">13</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=14">14</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=15">15</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=16">16</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=17">17</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=18">18</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=19">19</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=20">20</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=21">21</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=22">22</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=23">23</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=24">24</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=25">25</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=26">26</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=27">27</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=28">28</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=29">29</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=30">30</a></span>

    <span>-</span>

    <span><a href="/Holidays/labor_day/?page=2">Next &gt;</a></span>

  3. #3
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    Quote Originally Posted by rumrunner439 View Post
    index.html
    index.html?page=1
    index.html?page=2
    index.html?page=3
    All those urls will show the same page (whatever's in the file index.html) unless it's specially set up to run code in the file that will process the query string "page=x" and deliver different content accordingly. Files with the extension .html wouldn't normally do this but you can force them to behave like PHP or SSI files if that's what you want to do.

    Alternatively you may simply want to link to different pages, eg.
    index.html
    page1.html
    page2.html
    etc.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  4. #4
    Join Date
    May 2008
    Posts
    78
    Works perfect when i change index.html?page=1 to page1.html
    now the big problem is how the heck do i make a change to the entire site its almost or over a thousand different pages with links on everyone
    anyone know of a find and replace to make that kind of a fix

  5. #5
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    How is it that you've got so many pages with these links on them?
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  6. #6
    Join Date
    May 2008
    Posts
    78
    well the guy i had code them did it that way
    i think its more like you said now i think about it there must be a page of code im missing telling the .html to act like .php , i dont know what it would be called to look in my files for it , and i see no ref to it in code anywhere.
    Every new catagory has a index.html then the page links follow.

  7. #7
    Join Date
    May 2008
    Posts
    78

    * How to force .html to act like .php in page links

    Quote Originally Posted by foobic View Post
    All those urls will show the same page (whatever's in the file index.html) unless it's specially set up to run code in the file that will process the query string "page=x" and deliver different content accordingly. Files with the extension .html wouldn't normally do this but you can force them to behave like PHP or SSI files if that's what you want to do.

    Alternatively you may simply want to link to different pages, eg.
    index.html
    page1.html
    page2.html
    etc.
    Ok Someone has to know how i can force those .html pages to act like .php give me a hint please
    i started to change some of my catagories over but some of them have a hundred pages so thats a hundred pages by a hundred fixes, and i have over a hundred catagories even a sed command takes forever due to so many graphics to match all the catagories. So if someone knows how i can make the links work would save me a ton of time if i have to manually change them its going to take a month.
    Thanks For Reading

  8. #8
    Join Date
    Feb 2005
    Location
    Australia
    Posts
    5,842
    Does your index.html page actually contain any php code? If it does, yes, you can tell the webserver to parse .html files as PHP. This line in .htaccess may do it but it's system-dependent - ask your host if it doesn't work:
    Code:
    AddType application/x-httpd-php .html
    However if index.html don't contain any php, the above will do nothing useful, since there's nothing to respond to the "page=x" query string anyway. In this case another option would be to rewrite the url using mod_rewrite - provided it's a typical *nix server that offers this. For that (again in .htaccess) you'd use something like:
    Code:
    RewriteEngine On
    RewriteCond %{QUERY_STRING} page=(.*)
    RewriteRule index.html page%1.html
    (untested, YMMV)

    I'd still suspect your best option would be to go back to the true source of these pages - if you've got so many of them then they must have been generated automatically - and fix that instead.
    Chris

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

  9. #9
    Join Date
    May 2008
    Posts
    78
    ok this is driving me crazy. I did the add code to .htaccess and it didnt seem to do anything so i started just running sed commands to make the changes well seemed to go well at first. BUT
    find . -type f -name '*' -exec sed -i 's/\?page\=1/page1.html/g' {} ";" -print did great until i saw 10 throught 19 lol it now is also changed but to page1.html0 for 10 and page1.html1 for 11 etc up to 19.
    also i tried to get it to change the file name and that was a no go.
    so ive been manually changing them from
    index.html?page=1 to page1.html
    and from what i did last night that will be a 22 or more day job.
    So im back to more suggestions lol before i mess up the site
    Thanks for all your help foobic when i do make the changes the site works perfect but id just rather make your suggested change in my spare time not all at once .................

  10. #10
    you just need to download your code files and use a text editor like notepad++ and do a find and replace. Using a rewrite or a php script to do that is just not the right way. You need to just fix your code in the source.

Similar Threads

  1. Link exchange question on Site with PR 5 but links page 2
    By pcgeek in forum Domain Name Offers
    Replies: 1
    Last Post: 09-18-2007, 06:55 AM
  2. Replies: 6
    Last Post: 12-20-2006, 06:10 AM
  3. -=Pr3 Links on 7 Pages For Sale @ 1.15 Only , 12 links per page only.=-
    By Energizer Bunny in forum Advertising Offers
    Replies: 3
    Last Post: 10-30-2006, 11:22 PM
  4. Question - Text links & Image links too?.
    By Gen-T in forum Web Design and Content
    Replies: 3
    Last Post: 11-01-2005, 12:51 PM
  5. quick question Links
    By Lippy in forum Programming Discussion
    Replies: 9
    Last Post: 11-16-2002, 04:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •