Announcement

Collapse
No announcement yet.

Toolkit TKSL fucntion and redirects when category code and product code are in a url

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

    Toolkit TKSL fucntion and redirects when category code and product code are in a url

    Here is my htaccess code I have with shortlinks enabled using TKSL

    Code:
    DirectoryIndex /mm5/merchant.mvc?Screen=SFNT
    RewriteEngine On
    RewriteRule ^mm5/admin.mvc? - [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^p/([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Product_code=$1 [QSA,NC,L]
    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^c/([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Category_code=$1 [QSA,NC,L]
    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^p/([^/]+)/([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Category_code=$1&Product_code=$2 [QSA,NC,L]
    RewriteCond %{REQUEST_FILENAME} !-s
    RewriteRule ^([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Code=$1 [QSA,NC,L]
    In my category pages I have included the category code in the url. so my product url on the category page look like

    www.mysite.com/p/category-code/product-code.html

    But here is what's happening if the product url contains the old category code its not redirecting to the newer on even though I have added all the old category codes in file called ARCHIVE after following the TKSL guidelines

    Instead of redirecting it simply displays a blank white page, so currently this url display blank

    http://www.mysite.com/p/old-category...duct-code.html but it should redirect to the www.mysite.com/p/category-code/product-code.html

    what am I missing or do I have to use htaccess file for this and if so any easier way to do it rather than hard coding each and every url as there are thousands of products

    Thanks
    Keyboard Not Found..... Press F1 to continue

    #2
    Re: Toolkit TKSL fucntion and redirects when category code and product code are in a

    This Line:

    RewriteRule ^p/([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Product_code=$1 [QSA,NC,L]

    Is saying, when the url looks like

    www.mysite.com/p/category-code/product-code.html

    The send the following request

    /mm5/merchant.mvc?Screen=TKSL&Product_code=[Category_code] [QSA,NC,L]

    Try moving the redirect:

    RewriteRule ^p/([^/]+)/([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Category_code=$1&Product_ code=$2 [QSA,NC,L]

    BEFORE the first product redirect.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Re: Toolkit TKSL fucntion and redirects when category code and product code are in a

      Thanks for replying appreciate it but that did not work. I made the change as you have suggested, here is my new mark up

      Code:
      DirectoryIndex /mm5/merchant.mvc?Screen=SFNT
      RewriteEngine On
      RewriteRule ^mm5/admin.mvc? - [QSA,L]
      RewriteCond %{REQUEST_FILENAME} !-s
      RewriteRule ^p/([^/]+)/([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Category_code=$1&Product_code=$2 [QSA,L]
      RewriteCond %{REQUEST_FILENAME} !-s
      RewriteRule ^c/([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Category_code=$1 [QSA,L]
      RewriteCond %{REQUEST_FILENAME} !-s
      RewriteRule ^p/([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Product_code=$1 [QSA,L]
      RewriteCond %{REQUEST_FILENAME} !-s
      RewriteRule ^([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Code=$1 [QSA,L]
      Keyboard Not Found..... Press F1 to continue

      Comment


        #4
        Re: Toolkit TKSL fucntion and redirects when category code and product code are in a

        can you log what the TKSL screen is seeing for Cat and Product code?

        (If you have MALF log turned on, it should already show these.)
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          Re: Toolkit TKSL fucntion and redirects when category code and product code are in a

          I don't see MALF log file either under the Log folder in mivadata folder or under loggin setting in dashboard I see the e-urchin log and cim-activity log both unchecked.

          Where would I be turning the MALF log module

          Thanks again
          Keyboard Not Found..... Press F1 to continue

          Comment


            #6
            Re: Toolkit TKSL fucntion and redirects when category code and product code are in a

            under Logging...but make sure you turn it off again after testing as it eats up disc space...also, the output, malf.log will located in the root of your data directory.
            Bruce Golub
            Phosphor Media - "Your Success is our Business"

            Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
            phosphormedia.com

            Comment


              #7
              Re: Toolkit TKSL fucntion and redirects when category code and product code are in a

              Sorry to ask like this, under logging there are the modules I see

              1)e-urchin log ( not turned on)

              2) CIM activity log ( not turned on)

              I don't see any MALF log

              Thanks
              Keyboard Not Found..... Press F1 to continue

              Comment


                #8
                Re: Toolkit TKSL fucntion and redirects when category code and product code are in a

                Many emporiumplus modules require the cim log be turned on. It does not create log files but does contain functions needed by several modules.
                Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
                Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
                Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
                Facebook http://www.facebook.com/EmporiumPlus
                Twitter http://twitter.com/emporiumplus

                Comment

                Working...
                X