Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Feb 2009
    Posts
    738
    Plugin Contributions
    0

    Default Shorter version of the URL

    This might be a long shot, but I am giving it a try.

    I am in the process of writing a book and would like to refer to some of my products in the store. Since the book is meant to be printed (yes, on paper), links are really kind of... complicated to include. Is there a way to provide a shorter link to some of the products in my Zencart store without having to use other services like Bitly or such?

    I am assuming not, but I am taking a chance.

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    674
    Plugin Contributions
    0

    Default Re: Shorter version of the URL

    Not sure if this is what you want but for print media I include something like this in my .htaccess file

    Code:
    Redirect 301 /tshirt1 https://mywebsite.com/clothes/tshirts/tshirt1
    This redirects https://mywebsite.com/clothes/tshirts/tshirt1 to https://mywebsite.com/tshirt1

    This shortens it somewhat although I'm not looking to shorten the domain name. I use a URI rewriter but I suspect it will work with ZC native URL's.
    Simon

  3. #3
    Join Date
    Jul 2012
    Posts
    14,553
    Plugin Contributions
    17

    Default Re: Shorter version of the URL

    If you use an htaccess file at the root of your store, you could provide a link as short as the domain name of your store, a slash, and a single character. Then in your htaccess you would have to forward that to your preferred product/location.

    Otherwise, if you still find the dynamic uris "too long" for a location: 'index.php?main_page=product_info&products_id=x' then you may want to consider a uri rewriter. There are two recommended ones: Ceon URI Mappings and Ultimate SEO URIs. With Ceon you could use whatever you want in print and still have a normal preferred address. With USU the address can be shortened down to the product and/or category id's for the most part: '/-c-x/-p-y' and not include any text about the item/product.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  4. #4
    Join Date
    Feb 2009
    Posts
    738
    Plugin Contributions
    0

    Default Re: Shorter version of the URL

    Oh that is interesting. It might be enough for me. I don't plan on shortening my domain either. I have an associated blog where I can use PrettyLinks, but i would be stuck having to include /blog/ in the URL, which is kind of misleading. But this might be just what i need.
    Thanks.

  5. #5
    Join Date
    Feb 2009
    Posts
    738
    Plugin Contributions
    0

    Default Re: Shorter version of the URL

    Now that I am at that point in the book writing, I have a simplistic question: where is the .htaccess file? Or is it possible there isn't any yet?

  6. #6
    Join Date
    Jul 2012
    Posts
    14,553
    Plugin Contributions
    17

    Default Re: Shorter version of the URL

    Quote Originally Posted by CaroleAs View Post
    Now that I am at that point in the book writing, I have a simplistic question: where is the .htaccess file? Or is it possible there isn't any yet?
    The .htaccess needed to support this typically would need to be added to the root of the store/domain as ZC does not need one it does not exist as part of the installation.

    It will need to be added.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  7. #7
    Join Date
    Feb 2009
    Posts
    738
    Plugin Contributions
    0

    Default Re: Shorter version of the URL

    Thank you!

  8. #8
    Join Date
    Feb 2009
    Posts
    738
    Plugin Contributions
    0

    Default Re: Shorter version of the URL

    OK I am not getting the result I want so I am obviously doing something wrong.

    My domain is creationcassel.com, and my store is on creationcassel.com/store

    I wrote:
    Redirect 301 /align https://creationcassel.com/store/ind...roducts_id=327

    Will that create a link for creationcassel.com/align or creationcassel.com/store/align ?

    And where to put the .htaccess file, would it be directly in the folder: creationcassel.com/store ? or somewhere else?

  9. #9
    Join Date
    Jul 2012
    Posts
    14,553
    Plugin Contributions
    17

    Default Re: Shorter version of the URL

    How about clearly stating the wanted use of this rewrite concept so that hopefully a one time solution is provided.

    The placement of the file and the contents of it will be different based on what is desired/needed and the result sought.

    Also, when saying that not getting the result that you want, what result are you getting?

    Lastly, is that one liner the only thing in the .htaccess file? If so, that is part of the problem...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  10. #10
    Join Date
    Feb 2009
    Posts
    738
    Plugin Contributions
    0

    Default Re: Shorter version of the URL

    You are correct. I was probably somewhat unclear.

    I am writing a book that will be printed (yes, on paper) so any link to a product in my store could not be clickable AND if i put the whole link it just looks "messy" and hard for someone to retype. So, I would like to have a shorter link that they could type with much less risk of typo.

    So, for example, instead of this link:
    https://creationcassel.com/store/ind...roducts_id=327

    I would like to be able to put something shorter, like:
    https://creationcassel.com/align
    and the viewer would be redirected to the full URL above.

    One suggetion was to include that code (that i mentioned above) in the .htaccess file, but since I don't have one, I have to create one.

    So there are the issue:
    - i probably created the .htaccess file wrong
    - i probably put it in the wrong place

    Right now, if I type https://creationcassel.com/align (or even https://creationcassel.com/store/align), i get a 404, so that is my hint that i am doing something(s) wrong.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 How to make the search box shorter on the right sidebox?
    By lina0962 in forum General Questions
    Replies: 5
    Last Post: 26 Nov 2015, 05:22 PM
  2. Shorter SEO-friendly URLs
    By driven13 in forum General Questions
    Replies: 7
    Last Post: 31 Jul 2010, 08:22 AM
  3. Shorter Category Descriptions?
    By chris parker in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 6 Jan 2008, 05:05 PM
  4. Changing address bar URL's to shorter versions
    By peacefuldaze in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Dec 2007, 02:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR