Forum Moderators: phranque

Message Too Old, No Replies

Is this a mod rewrite issue?

         

phierce

8:08 pm on Oct 23, 2009 (gmt 0)

10+ Year Member



For the past week I have been reading up on and re-doing a client's htaccess correctly- thanks to all the great resources in the library here.

I have one question though. And it has to do with pages that have pagination.

For example, if you go to the bottom of the page

http://www.example.com/generators-hz-60-ph-1-kwi-7-kwf-150.html

and click #2 you will get to this page: (notice it says page-1)

http://www.example.com/generators-page-1-hz-60-ph-1-kwi-7-kwf-150.html

However, if you click previous or #1 to go back, you don't go back to the original page, but you go to:

http://www.example.com/generators-page-0-hz-60-ph-1-kwi-7-kwf-150.html

notice this it says (page-0)

Now , I have 2 pages that are the same content with different, urls, is this a modrewrite issue and if so, how can I solve it? Here are the rules for this particular page:


RewriteRule ^generators-page-([^/]+)-hz-([^/]+)-ph-([^/]+)-kwi-([^/]+)-kwf-([^/]+)\.html?$ /productos_FC.php?pageNum_porductos_fil=$1&hz=$2&ph=$3&kwi=$4&kwf=$5 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /productos_FC\.php\?pageNum_porductos_fil=([^&]+)&hz=([^&]+)&ph=([^&]+)&kwi=([^&]+)&kwf=([^&]+)\ HTTP/
RewriteRule ^productos_FC\.php$ http://www.example.com/generators-page-%1-%2-%3-%4-%5\.html? [R=301,L]

[edited by: jdMorgan at 9:09 pm (utc) on Oct. 23, 2009]
[edit reason] Please use example.com. See Terms of Service and Charter. [/edit]

jdMorgan

9:12 pm on Oct 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The mod_rewrite code looks OK.

However, instead of clicking on the links, just hover over them and examine the status bar of your browser. Is it showing the correct URL for 'back' and '#1'? If not, then your script or "SEO-friendly URL" plug-in isn't generating the proper page URL, and mod_rewrite can't do anything about that problem.

Jim