|

?sef_rewrite=1
Posted 06 December 2011 - 06:45 PM #1
We recently migrated to CS Cart from Joomla/VirtueMart and need a pretty high volume of URLs redirected. Regardless of the method of redirection we use, the ?sef_rewrite=1 is appended to the URL.
I've seen a fair number of posts about this topic as well as a few folks who claim to have fixed this, but there's nothing currently in the forums that outlines the steps necessary to remove this noise from the end of the redirected URL.
Does this have something to do with canonical URLs? I've seen mention of CS Cart potentially interpreting the redirected URLs as being duplicate content also.
Thoughts? Fixes?
Posted 06 December 2011 - 11:10 PM #2
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 06 December 2011 - 11:59 PM #3
What we're trying to avoid is having Google and Bing index these URLs with the appended noise (which is already happening). Here's how we're handling the redirect -
RewriteCond %{REQUEST_URI} .*\/Category/11.html RewriteRule ^.*$ http://mydomain.com/category.html [L,R=301]
I modded the SEO add-on func.php file to account for trailing slashes (there's a fix found here in the forums) thinking that may help, but it unfortunately doesn't.
Would I be wrong in thinking that ?sef_rewrite=1 is essentially the product of a loop? Should the redirect be written with the non-SEF URL?
Posted 07 December 2011 - 12:04 AM #4
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 07 December 2011 - 12:39 AM #5
I've gotten the ?sef_rewrite=1 to show up on the Home Page once. I cleared the cache via the browser and the address showed as http://mydomain.com?sef_rewrite=1.
Frameworks like WordPress, SilverStripe, etc... will allow rewrites in the method in my reply above, and it's actually really frustrating to see a framework as robust as CS Cart fall down in this area. While this doesn't at all affect our flow of business, it's a matter of ensuring these "duplicate" or noisy URLs aren't indexed and more importantly don't show up via organic search results. It's fine for now, though as our business increases this is going to be a big thorn in our side.
So if it does boil down to an issue of rewriting with the non-SEF compliant URL, how does one find that without disabling the add-on? I'd like to at least experiment...
Posted 07 December 2011 - 01:23 AM #6
RewriteCond %{REQUEST_URI} .*\/old-page\/ RewriteRule ^.*$ http://www.domain.com/new-page/ [L,R=301]
Hope that helps. I would also advise signing up for Google Merchant Center and Webmaster Tools if you haven't already, and add "?sef_rewrite=1" as an identifier to ignore, thus, Google ignores it and will index the URL as "domain.com/page-name/" instead of "domain.com/page-name/?sef_rewrite=1" - most of my issues with this are now resolved with only a few URL's still indexed including the sef_rewrite tag appended to the URL's. The canonical URL's addon, combined with the trailing slash edit you previously mentioned, will also help.
Posted 07 December 2011 - 02:00 AM #7
Thanks so much for chiming in.
At a glance, it doesn't appear as though your code example differs all that much from mine. If there's something I'm missing please let me know.
We are signed up for the Webmaster tools and while we added exceptions/blocks for the weirdo URLs Joomla/VirtueMart often produce, we still saw them indexed and it has been a PITA. Joomla/VirtueMart does produce duplicate content, so part of our move to CS Cart was to engage our customers with a smarter system. As for Google Merchant, my understanding is that a lot of that functionality is going away in favor of Google Wallet. If you're aware of something different, please let me know.
To break this all down - there is no way to prevent CS Cart from appending ?sef_rewrite=1 to any redirected URL. The best way to attack this is to stay on top of the SEO and ensure the appended thingamadoo is blocked so everything is correctly indexed. We professionals often hold our cards close to our chest and since this is a topic that has been open for some time in the forums (across multiple posts dating back to 2008), let's please put this to rest and proffer a definitive solution for future users.
How does one mitigate backlinks when ?sef_rewrite=1 appears in the users browser and they copy/paste the URL? Bing and Google index these regardless, so what luck have you had ensuring your URLs display in a manner you're satisfied with (i.e. clean)?
Posted 14 April 2013 - 07:15 AM #8
Did you solve the problem with /?sef_rewrite=1 ? If yes, please, share your solution

Posted 14 April 2013 - 03:31 PM #9
Use canonical URL's to avoid indexing of 'sef_rewrite' in the URL, something simple like this would do the job, add this within the <head> of the document (enable my_changes addon and place code in /skins/yourskin/customer/addons/my_changes/index/meta.post.tpl):
<link rel="canonical" href="{$smarty.const.REAL_URL|fn_url}" />
Or spend some money and do it the more advanced way: Canonical URL Addon (The extra functionality of being able to create your 301 redirects within the cart makes this addon a worthy addition in itself!)
Posted 14 April 2013 - 08:04 PM #10

Posted 23 April 2013 - 07:06 PM #11
Thanks very much for bumping this thread. I'm actually back on the path of having to inset more than 200 301's because of the massive changes CS Cart made to the SEO module in version 3.0.3 and higher.
We did purchase the Canonical URL addon, but ended up ditching it because it doesn't really allow administrators to create 301 redirects as advertised. It allows you to rename an SEO compliant URL, but you're not actually redirecting it (hence the addon's name, Canonical). The developers need to amend the language regarding the addon's functionality because using it made matters worse by creating invisible redirect loops and renaming products/categories arbitrarily. That said, we're right back to where we were in December of 2011 and still looking for an effective means of managing 301 and 302 redirects before Google kicks us down a notch for what will in the end be several hundred 404 errors.
Where we're at now is hand editing the .htaccess file to create the redirects and then testing them one by one to make sure they work as expected. We are running into several redirect loops that were created by the Canonical URL addon, hence the one-to-one testing of each redirect. When we find a URL with a redirect loop, I then edit the database and regress the damage done by the addon. For something that should be an extremely simple administrative task a la Drupal, WordPress, Magento, et al... it's surprising that URLs cannot be administrated inside of the core of CS Cart. The current flow is way too laborious.
A different addon that we're going to evaluate is CDSEO - http://www.webgraphi...l-cdseo-v3.html. Anyone have experience with it? I really wish there was a "try before you buy" option for these CS Cart addons because many of them are poorly developed/planned, and I'm not really of a mind to continue throwing money at things that frankly don't function.
Posted 24 April 2013 - 02:31 AM #12
One Step Checkout Addon - The ultimate checkout experience
Best CS-Cart SEO addon - CS-Cart SEO Ultimate Addon
PM for quality custom work/project
Posted 25 April 2013 - 12:34 AM #13
If all you want to do is keep track of changing SEO names and 301 to the current one, then you might want to look at our SEO History addon (http://www.ez-ms.com/seo-history.html). Only caveat I'd give is that it may not handle path component changes well. I.e. if you had mysite.com/orig_cat_name/product.html and then changed the SEO name for orig_cat_name to new_cat_name, it will struggle to resolve mysite.com/orig_cat_name/product.html with a 301. However I do believe it will redirect there, just not with a 301. End path components like the 'product.html' are handled just fine and also when the category is the end component. It's been a while so I forget what the issue was but it became complicated to do the replacements while in recursion.
The addon will keep track of an infinite number of SEO name changes and allow you to search the standard SEO name table as well as the seo_history table. You can also delete old ones through the UI as well.
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 28 April 2013 - 04:25 PM #14
CSC Version 2.2.4
Posted 28 April 2013 - 07:44 PM #15
I'm apparently on the new hardware and all appears to be well. At least it was a Friday and not a Monday!

All should be well now.
For customers who saw a timeout (about 5 seconds) during admin login on license checks, I apologize for the inconvenience. While it may have take a little longer to get logged in, there were no effects after the login.
Thanks for checking. Kind of feels like a community out there!

EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 10 May 2013 - 04:07 PM #16

# /abc.html to /def.html
# RewriteRule ^abc.html$ /def.html [R=301,L]
# /abc and /abc/ to /def
# RewriteRule ^abc/?$ /def [R=301,L]
For noobs, take out the comment "#".
As an example for most of my pages needing to be redirected from the old url to a new url so as not to loose the SEO "juice":
RewriteRule ^compressors/compressor-accessories.html$ /pneumatic-accessories/pneuline-controls-air-station-accessories.html [R=301,L]
Posted 29 January 2016 - 06:56 AM #17
To malvcomm
How exactly do i implement the code you provided above? I am a newbie here, and have the same problem as the person before. That is the ?sef_rewrite=1.
Please help!
Posted 16 December 2018 - 09:37 PM #18
This resolved my ?sef_rewrite=1 problem. Add this type of entry in your .htaccess in your webroot. No problems now
) And, I use this with with CSCart Rocks "Canonical" addon which helps mostly to remove dup product listings.
# /abc.html to /def.html
# RewriteRule ^abc.html$ /def.html [R=301,L]
# /abc and /abc/ to /def
# RewriteRule ^abc/?$ /def [R=301,L]
For noobs, take out the comment "#".
As an example for most of my pages needing to be redirected from the old url to a new url so as not to loose the SEO "juice":
RewriteRule ^compressors/compressor-accessories.html$ /pneumatic-accessories/pneuline-controls-air-station-accessories.html [R=301,L]
Has anyone tried this with a more current version of CS Cart; ie 4.5?
Jack
Posted 16 December 2018 - 09:45 PM #19
These are Apache controls and have nothing to do with cs-cart version.
I believe the issues are consistent across cs-cart SEO rule. Cs-cart handles SEO *name* changes but does not handle SEO *rule* changes.
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.