Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    65
    Plugin Contributions
    0

    Default 301 redirect in htaccess not working

    Hi there

    I'm tring to do a 301 redirect to have a "category alias" (I think it would be a smart way to avoid the creation another category and duplicating items, since there is a bunch od subcategories in it)

    so basically I would like to achieve a:

    Code:
    redirect 301 /store/index.php?main_page=index&cPath=7  http://www.thedomain.com/store/index.php?main_page=index&cPath=1
    so when one clicks on the category 7, they open teh category 1

    but unfortunately, it seems that everything after the questionmark is not recognized.

    Any suggestions (maybe with a rewrite rule, where I'm no expert?)

    Thanks!

  2. #2
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: 301 redirect in htaccess not working

    Try this as test to see if redirects work for you!
    redirect 301 /store/index.php http://www.thedomain.com/store/index...=index&cPath=1
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  3. #3
    Join Date
    Jan 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: 301 redirect in htaccess not working

    this works:

    redirect 301 /store/test.html http://www. thedomain.com/store/index.php?main_page=index&cPath=1

    but this:

    redirect 301 /store/index.php http://www. thedomain.com/store/index.php?main_page=index&cPath=1

    gives me a:

    Too many redirects occurred trying to open “http://www.thedomain.com/store/index...index&cPath=1”.

  4. #4
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: 301 redirect in htaccess not working

    In place of ?, = etc in the first url to be redirected can you put the html values and try?
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  5. #5
    Join Date
    Jan 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: 301 redirect in htaccess not working

    I don't understand what you want me to do :-)

    my url is:

    /store/index.php?main_page=index&cPath=7

    I don't see what I can replace in that

    (please note I'm not working with SEO URLs at all, it's pure ZC urls I'm trying to redirect)

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: 301 redirect in htaccess not working

    Rewriting addresses that contain & and = parameters is often quite complex in .htaccess.

    Try explaining again what you want to accomplish. Pretend you know nothing about htaccess and ways to do redirects. What is the situation you have now and what do you want to end up with? Maybe there's an easier or better way to get there ...
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v151 redirect 301 is not working
    By cvandijk in forum Basic Configuration
    Replies: 3
    Last Post: 23 Oct 2013, 09:19 PM
  2. Can't login after adding a 301 redirect in .htaccess
    By eutopia in forum Basic Configuration
    Replies: 0
    Last Post: 11 Oct 2011, 02:27 AM
  3. 301 redirect not working
    By plymgary1 in forum General Questions
    Replies: 5
    Last Post: 10 Jul 2010, 02:11 AM

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