Page 119 of 245 FirstFirst ... 1969109117118119120121129169219 ... LastLast
Results 1,181 to 1,190 of 2445
  1. #1181
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by lidlchris View Post
    ... do i have to go into hundreds of products and categories in the zen admin and add the old URL?? ..
    This way would ensure CEON URI Mapping has knowledge of the old URI and reduce the chance of 301 redirect chaining. You can directly add these using phpMyAdmin or use the Zen Cart admin. You still have to go through hundreds of URLs no matter which way you use.

    Quote Originally Posted by lidlchris View Post
    ... for example "http://www.swordsofhonor.com/theater-swords.html?pg=2html=theater-swords"
    is being redirected to "http://www.swordsofhonor.com/fantasyswords.html?pg=2html=theater-swords" when it should go to "http://www.swordsofhonor.com/fantasyswords.html"

    here is the 301 redirect in the htaccess file
    Code:
    RedirectMatch	301	^/theater-swords.*	 	http://www.swordsofhonor.com/fantasyswords.html
    is this fixable??
    This is not an issue with CEON URI Mapping.

    If you want to remove the "Query String" you need to use mod_rewrite instead of using mod_alias to issue the redirect. Keep in mind if you change the location in the Zen Cart admin in the future you will end up with chained 301 redirects.

    If you must use a 301 in the .htaccess file... Only use ONE of the following rules (based upon your needs).
    Code:
    #Place before other CEON URI Mapping Rules (METHOD 1)
    #This matches based upon only the URI ignoring the Query String
    RewriteRule ^/theater-swords.html$ /fantasy-swords.html [R=301,L]
    
    #Place before other CEON URI Mapping Rules (METHOD 2)
    #This matches based upon the URI and the Query String
    RewriteCond %{QUERY_STRING} ^pg=2html=theater-swords$
    RewriteRule ^/theater-swords.html$ /fantasy-swords.html [R=301,L]
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  2. #1182
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by lhungil View Post
    This way would ensure CEON URI Mapping has knowledge of the old URI and reduce the chance of 301 redirect chaining. You can directly add these using phpMyAdmin or use the Zen Cart admin. You still have to go through hundreds of URLs no matter which way you use.

    turns out to be only about 25% of the redirects are for products/categories/pages that are on the current site - so 75% are for old pages, non-existant pages, and blog pages..


    This is not an issue with CEON URI Mapping.
    yes i think i stated that - it works great..


    If you want to remove the "Query String" you need to use mod_rewrite instead of using mod_alias to issue the redirect. Keep in mind if you change the location in the Zen Cart admin in the future you will end up with chained 301 redirects.

    If you must use a 301 in the .htaccess file... Only use ONE of the following rules (based upon your needs).
    Code:
    #Place before other CEON URI Mapping Rules (METHOD 1)
    #This matches based upon only the URI ignoring the Query String
    RewriteRule ^/theater-swords.html$ /fantasy-swords.html [R=301,L]
    
    #Place before other CEON URI Mapping Rules (METHOD 2)
    #This matches based upon the URI and the Query String
    RewriteCond %{QUERY_STRING} ^pg=2html=theater-swords$
    RewriteRule ^/theater-swords.html$ /fantasy-swords.html [R=301,L]
    so with the 2nd method, i would have to know all of the query strings that i am trying to redirect for?? that option won't work.. and method one is the one i currently am using - somewhat - and that just carries the query string with it.. so then there is no other way to redirect to a static URL without carrying the query string - for the 75% of the urls i need to redirect?? unless, or course, i do a 1 for 1 redirect for all the URL's instead of trying to 'cheat' by lumping some together..

  3. #1183
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by lidlchris View Post
    so with the 2nd method, i would have to know all of the query strings that i am trying to redirect for?? that option won't work. ...
    Depends on what you need to match. Thus why both examples were given.

    Quote Originally Posted by lidlchris View Post
    ... and method one is the one i currently am using - somewhat - and that just carries the query string with it.. so then there is no other way to redirect to a static URL without carrying the query string - for the 75% of the urls i need to redirect?? ...
    Apache mod_alias (your example) by default keeps the Query String.

    Apache mod_rewrite (posted solution) by default drops the Query String. In the event mod_rewrite on your hosting provider is not by default dropping the Query String you can explicitly tell mod_rewrite to drop the Query String. This is documented in the Apache mod_rewrite documentation for RewriteRule and for RewriteRule Flags.
    Last edited by lhungil; 28 May 2013 at 04:21 AM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  4. #1184
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by lhungil View Post
    Depends on what you need to match. Thus why both examples were given.



    Apache mod_alias (your example) by default keeps the Query String.

    Apache mod_rewrite (posted solution) by default drops the Query String. In the event mod_rewrite on your hosting provider is not by default dropping the Query String you can explicitly tell mod_rewrite to drop the Query String. This is documented in the Apache mod_rewrite documentation for RewriteRule and for RewriteRule Flags.
    i appreciate your help... still not getting anywhere and this is so d............m frustrating.. i went back to a simple 1 to 1 301 rewrite since i know all of the files that need to be rewritten and to where.. but NONE of it is working now.. i'm ready to blow up this computer.. here are a few examples NOT working:

    RewriteRule ^/testimonials\.html$ index.php?main_page=page_2 [R=301,L]
    RewriteRule ^/umarex$ http://www.swordsofhonor.com/?main_p...acturers_id=50 [R=301]
    RewriteRule ^/united-cutlery$ http://www.swordsofhonor.com/?main_p...acturers_id=49 [R=301]


    i placed ALL of these rewrites above the CEON coding in htacess...

  5. #1185
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Ceon URI Mapping v4.x

    A few things:
    • The new location should be an absolute path. So either starts with "http://" or with "/".
    • All RewriteRules with a flag of R should also use L to say "stop processing other rules and redirect now". So [R=301,L].
    • If for some reason the server is not dropping the Query String, use the flag QSD. So [R=301,QSD,L].
    • If one needs to keep the Query String, use the flag QSA. So [R=301,QSA,L].
    • On some servers the leading "/" is stripped from the "match" portion before being passed to mod_rewrite, so one may need to omit the leading "/" in the "match".


    As lidlchris noted the best place for these "manual" 301 redirects will be after the "RewriteEngine On" and before the other stuff added by CEON URI Mapping.

    Code:
    RewriteRule ^umarex$ http://www.swordsofhonor.com/?main_page=index&manufacturers_id=50 [R=301,L]
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  6. #1186
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by lhungil View Post
    A few things:
    • The new location should be an absolute path. So either starts with "http://" or with "/".
    • All RewriteRules with a flag of R should also use L to say "stop processing other rules and redirect now". So [R=301,L].
    • If for some reason the server is not dropping the Query String, use the flag QSD. So [R=301,QSD,L].
    • If one needs to keep the Query String, use the flag QSA. So [R=301,QSA,L].
    • On some servers the leading "/" is stripped from the "match" portion before being passed to mod_rewrite, so one may need to omit the leading "/" in the "match".


    As lidlchris noted the best place for these "manual" 301 redirects will be after the "RewriteEngine On" and before the other stuff added by CEON URI Mapping.

    Code:
    RewriteRule ^umarex$ http://www.swordsofhonor.com/?main_page=index&manufacturers_id=50 [R=301,L]
    adding the ,L in the parameters [R=301,L] made them all work.. BUT i still can't get the ones with query strings to drop the strings.. when i use QSD, my entire website gives an 'internal server error' and no pages can be brought up.. i remove the QSD and all is fine.. i've tried QSD in different positions of the parameters [QSD,R=301,L], [R=301,L,QSD].

  7. #1187
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by lidlchris View Post
    ... i still can't get the ones with query strings to drop the strings..
    Ahhh, your hosting provider is using Apache 2.2 (the QSD flag was added in Apache 2.4). Try the following to force Apache 2.2 to drop the Query String (it's a kludgy workaround - been awhile since I've used this):
    Code:
    RewriteRule ^theater-swords.html$ /fantasy-swords.html? [R=301,L]
    Sorry I did not check your server version / remember this workaround earlier. Any of your RewriteRules which include a "?" such as the one for Umarex should already be dropping any extra query string components.

    On a side note: If you ever use Google AdWords - make sure you change any ADs to use the new URLs as the old redirected URLs will discard the Google AdWords tracking code. Same goes for Campaign tracking via Google Analytics.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  8. #1188
    Join Date
    Feb 2013
    Posts
    345
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by lhungil View Post
    Ahhh, your hosting provider is using Apache 2.2 (the QSD flag was added in Apache 2.4). Try the following to force Apache 2.2 to drop the Query String (it's a kludgy workaround - been awhile since I've used this):
    Code:
    RewriteRule ^theater-swords.html$ /fantasy-swords.html? [R=301,L]
    Sorry I did not check your server version / remember this workaround earlier. Any of your RewriteRules which include a "?" such as the one for Umarex should already be dropping any extra query string components.

    On a side note: If you ever use Google AdWords - make sure you change any ADs to use the new URLs as the old redirected URLs will discard the Google AdWords tracking code. Same goes for Campaign tracking via Google Analytics.
    wow - worked great... and thanks for the tip on adwords.. you've been a great help..

  9. #1189
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Ceon URI Mapping v4.x

    Quote Originally Posted by lidlchris View Post
    wow - worked great...
    Glad we were able to get things working as desired! And thank you for letting us know it worked
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  10. #1190
    Join Date
    May 2013
    Location
    Brisbane, Queensland, Australia, Australia
    Posts
    7
    Plugin Contributions
    0

    Default Re: Ceon URI Mapping v4.x

    Ok, I've solved the problem with the configure.php file. Am now up to rewriting. Where do I find the .htaccess file?

    ETA - Please ignore. Apparently not enough caffeine today.
    Last edited by LisaB; 29 May 2013 at 08:15 AM.

 

 

Similar Threads

  1. v139d Ceon uri mapping, how to generate uri mapping for bulk bulk-imported products?
    By mybiz9999 in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 8 Jan 2013, 06:52 AM
  2. CEON URI Mapping
    By jmkent in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 22 Nov 2012, 04:28 PM
  3. Ceon URI Mapping (SEO)
    By conor in forum All Other Contributions/Addons
    Replies: 2906
    Last Post: 9 Sep 2011, 08:31 AM
  4. Ceon URI Mapping v4
    By conor in forum All Other Contributions/Addons
    Replies: 110
    Last Post: 14 Aug 2011, 02:51 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