Announcement

Collapse
No announcement yet.

Ultimate SEO Links - SEO style pagination links

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Ultimate SEO Links - SEO style pagination links

    I really hate to bother Scott with another one of my ignorant questions, but I'm wondering what I'm missing when I'm trying to implement the SEO style pagination links

    I've added the required lines to the .htaccess file but am I supposed to put something specific in the QUERY_STRING where he notes it?

    I've changed the code as outlined, the links are not broken, it just does not move to the next page.

    From the address bar:

    HTML Code:
    http://www.domain.com/yada.html?Offset=20&SortBy=
    verses

    HTML Code:
    http://www.domain.com/mm5/merchant.mvc?Screen=CTGY&Store_Code=UN&Offset=20&SortBy=&Category_Code=yada
    So what I am doing wrong?
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Re: Ultimate SEO Links - SEO style pagination links

    Leslie, you might try adding the QSA flag to the mod_rewrite rules in the .htaccess file (the parts in square brackets at the end, usually). I can't guarantee what that might do to the rest of your strategy but it could work for these purposes and it might be just fine sitewide.

    Untested. :)

    See http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html for more details - search for QSA.

    Susan
    Susan Petracco
    NetBlazon

    1.866.400.2444

    _____________________________________________

    Like us on Facebook

    Comment


      #3
      Re: Ultimate SEO Links - SEO style pagination links

      Leslie,

      &%{QUERY_STRING} is the only thing you need to add to the end of each rewrite with that method. Would need to see your actual rewrites to diagnose further.

      Comment


        #4
        Re: Ultimate SEO Links - SEO style pagination links

        This is what all that is being used:


        Code:
        RewriteEngine On
        RewriteRule ^([A-Za-z0-9_-]+)\.html$ /miva/merchant.mvc?Screen=USL&Code=$1 [T=application/x-httpd-mv]
        
        RewriteRule ^([^.]+)-p-([^.]+)\.html$ /miva/merchant.mvc?Screen=PROD&Product_Code=$1&Category_Code=$2&%{QUERY_STRING}
        RewriteRule ^([^.]+)\.html$ /miva/merchant.mvc?Screen=USL&Code=$1&%{QUERY_STRING}
        
        RewriteRule ^(.*)/(.*)\.html$ /miva/merchant.mvc?Screen=PROD&Product_Code=$2&Category_Code=$1 [L]
        But my storemorph code might not be right either because the pages don't change when you click on one of the page numbers and the View 10 20 30 Products per page doesn't change anything either:

        Code:
        <table width="100%"><tr><td>
                        Products found in this category: <b>&mvt:global:Ttl_Products;</b><br />
                        View 
                        <mvt:if expr="l.settings:product_list:per_page EQ 10">
                            10
                        <mvt:else>
                            <a href="/&mvta:category:code;.html?Offset=&mvta:page:offset;&SortBy=&mvte:global:SortBy;&show=10">10</a>
                        </mvt:if>
        
                        <mvt:if expr="l.settings:product_list:per_page EQ 20">
                            20
                        <mvt:else>
                            <a href="/&mvta:category:code;.html?Offset=&mvta:page:offset;&SortBy=&mvte:global:SortBy;&show=20">20</a>
                        </mvt:if>
            
                        <mvt:if expr="l.settings:product_list:per_page EQ 30">
                            30
                        <mvt:else>
                            <a href="/&mvta:category:code;.html?Offset=&mvta:page:offset;&SortBy=&mvte:global:SortBy;&show=30">30</a>
                        </mvt:if>
                        Products per page
                    </td><td align="right">
        
                <mvt:if expr="g.Ttl_Pages GT 5">
                <mvt:if expr="g.curr_page GT 3 and g.curr_page LT g.Ttl_Pages -3">...
                    <mvt:foreach iterator="page" array="pages">
                    <mvt:if expr="l.settings:page:number LT g.curr_page +3 and l.settings:page:number GT g.curr_page -3">
                        <mvt:if expr="l.settings:page:number EQ g.curr_page">
                                 &mvt:page:number;&nbsp;
                        <mvt:else>
                              <a href="/&mvta:category:code;.html?Offset=&mvta:page:offset;&SortBy=&mvte:global:SortBy;" >&mvt:page:number;</a>&nbsp;
                        </mvt:if>
                    </mvt:if>
                    </mvt:foreach>
                    ...
                <mvt:else>
                    <mvt:if expr="g.curr_page LT 4">
                        <mvt:foreach iterator="page" array="pages">
                        <mvt:if expr="l.settings:page:number LT 6">
                            <mvt:if expr="l.settings:page:number EQ g.curr_page">
                                     &mvt:page:number;&nbsp;
                            <mvt:else>
                                 <a href="/&mvta:category:code;.html?Offset=&mvta:page:offset;&SortBy=&mvte:global:SortBy;">&mvt:page:number;</a>&nbsp;
                            </mvt:if>
                        </mvt:if>
                        </mvt:foreach> more &gt;...
                    <mvt:else>...
                        <mvt:foreach iterator="page" array="pages">
                        <mvt:if expr="l.settings:page:number GT g.Ttl_Pages -5">
                            <mvt:if expr="l.settings:page:number EQ g.curr_page">
                                     &mvt:page:number; &nbsp;
                            <mvt:else>
                                  <a href="/&mvta:category:code;.html?Offset=&mvta:page:offset;&SortBy=&mvte:global:SortBy;">&mvt:page:number;</a>&nbsp;
                            </mvt:if>
                        </mvt:if>
                        </mvt:foreach>
                    </mvt:if>
                </mvt:if>
            <mvt:else>
                <mvt:foreach iterator="page" array="pages">
                    <mvt:if expr="l.settings:page:number EQ g.curr_page">
                             &mvt:page:number;&nbsp;
                    <mvt:else>
                          <a href="/&mvta:category:code;.html?Offset=&mvta:page:offset;&SortBy=&mvte:global:SortBy;">&mvt:page:number;</a>&nbsp;
                    </mvt:if>
                </mvt:foreach>
            </mvt:if>
        
            &nbsp;&nbsp;&nbsp;Page &mvt:global:curr_page; of &mvt:global:Ttl_Pages;
        
            </td></tr>
            </table>
        I'm figuring it's just me doing something wrong.
        Leslie Kirk
        Miva Certified Developer
        Miva Merchant Specialist since 1997
        Previously of Webs Your Way
        (aka Leslie Nord leslienord)

        Email me: [email protected]
        www.lesliekirk.com

        Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

        Comment


          #5
          Re: Ultimate SEO Links - SEO style pagination links

          Leslie,

          These two lines are redundant, I would remove the first one and keep your query string version:

          Code:
          RewriteRule ^([A-Za-z0-9_-]+)\.html$ /miva/merchant.mvc?Screen=USL&Code=$1 [T=application/x-httpd-mv]
          RewriteRule ^([^.]+)\.html$ /miva/merchant.mvc?Screen=USL&Code=$1&%{QUERY_STRING}
          This line allows for the product name and product code to be passed in the url. If your client is not using this method, I would kill it.

          Code:
          RewriteRule ^(.*)/(.*)\.html$ /miva/merchant.mvc?Screen=PROD&Product_Code=$2&Category_Code=$1 [L]
          This line passes both the product and category code via the url, usually used for breadcrumbs. Again, if this method is not in use, kill it.

          Code:
          RewriteRule ^([^.]+)-p-([^.]+)\.html$ /miva/merchant.mvc?Screen=PROD&Product_Code=$1&Category_Code=$2&%{QUERY_STRING}
          All said and done, the two redundant lines are more than likely your culprit.

          Comment


            #6
            Re: Ultimate SEO Links - SEO style pagination links

            I owe you a beverage of your choice! That fixed that problem. Now to figure out how to add the .html to the drop down sub-category selector and not break it.
            Code:
            <select onChange="location.href='/'+this.value;.html">
                        <option value="">select one</option>
                        <mvt:foreach iterator="subcat" array="sub_cats">
                            <option value="&mvt:subcat:code;">&mvt:subcat:name;</option>
                        </mvt:foreach>
                        </select>
            I tried adding it after the +this.value; and it acted like it wasn't even working. At least without the .html I would get a 404 error.
            Leslie Kirk
            Miva Certified Developer
            Miva Merchant Specialist since 1997
            Previously of Webs Your Way
            (aka Leslie Nord leslienord)

            Email me: [email protected]
            www.lesliekirk.com

            Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

            Comment


              #7
              Re: Ultimate SEO Links - SEO style pagination links

              Try this:
              location.href='/' + this.value + '.html';

              Comment

              Working...
              X