Announcement

Collapse
No announcement yet.

htaccess error/bug with "-" as short-link delimiter

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

    htaccess error/bug with "-" as short-link delimiter

    Don't know if this is in Wombat or not, but it's definitely within MM5-PR6. When using shortlinks with "-" as the delimiter, the htaccess rewrite rule will not work for categories with a "-" in the category code.

    While I understand the difficulty of determining "where the category code begins and ends" if the delimiter is IN the category code, at least for category pages this is not an issue. There is only ONE variable in category short links, everything after [prefix][delimiter] is the category code and should be able to contain the delimiter.

    eg: /c-my-category.html => category_code = my-category.

    Change:
    RewriteRule ^c-([^-.]+).html$ /mm5/merchant.mvc?Screen=CTGY&Category_code=$1 [L]

    To:
    RewriteRule ^c-([^/.]+).html$ /mm5/merchant.mvc?Screen=CTGY&Category_code=$1 [L]

    As a fix.

    Best,
    James
    James Harrell
    current: Friend of Miva
    2007-2012 eMediaSales & Viking Coders
    2005-2007 Miva Merchant
    2001-2005 Copernicus

    #2
    Re: htaccess error/bug with "-" as short-link delimiter

    Originally posted by eMediaSales View Post
    Don't know if this is in Wombat or not, but it's definitely within MM5-PR6. When using shortlinks with "-" as the delimiter, the htaccess rewrite rule will not work for categories with a "-" in the category code.

    While I understand the difficulty of determining "where the category code begins and ends" if the delimiter is IN the category code, at least for category pages this is not an issue. There is only ONE variable in category short links, everything after [prefix][delimiter] is the category code and should be able to contain the delimiter.

    eg: /c-my-category.html => category_code = my-category.

    Change:
    RewriteRule ^c-([^-.]+).html$ /mm5/merchant.mvc?Screen=CTGY&Category_code=$1 [L]

    To:
    RewriteRule ^c-([^/.]+).html$ /mm5/merchant.mvc?Screen=CTGY&Category_code=$1 [L]

    As a fix.

    Best,
    James
    This is by design. While what you propose would work for category (and product) URLs it would not on the Breadcrumb URLs. So to keep it simple, if you have "-" characters in your category or product codes you should use something else as the delimiter.
    Mark Johnson
    Vice President Development
    Miva Merchant
    [email protected]
    http://www.mivamerchant.com

    Comment

    Working...
    X