Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

?sef_rewrite=1 Rate Topic   - - - - -

 
  • m33
  • Member
  • Members
  • Join Date: 05-Dec 11
  • 37 posts

Posted 06 December 2011 - 06:45 PM #1

Howdy,

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?

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11427 posts

Posted 06 December 2011 - 11:10 PM #2

Generally you end up with that GET parameter when the SEO name that is requested can't be resolved in the cart.

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.


 
  • m33
  • Member
  • Members
  • Join Date: 05-Dec 11
  • 37 posts

Posted 06 December 2011 - 11:59 PM #3

Thanks for the reply.

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?

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11427 posts

Posted 07 December 2011 - 12:04 AM #4

Not sure... The standard .htaccess file will call the cart with sef-rewrite=1 indicating that the internal rewrite engine should look up the name and resolve it to a controller/mode and maybe a REQUEST variable. If it can't find the name, I think it will generate a 404. I'm unclear as to what exactly would cause it to display the home page with ?sef-rewrite=1, but I would guess there is confusion between what you're doing manually with rewrite conditions/rules and what the cart is doing internally. Others are much more knowledgeable about rewrites here than I am.

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.


 
  • m33
  • Member
  • Members
  • Join Date: 05-Dec 11
  • 37 posts

Posted 07 December 2011 - 12:39 AM #5

Thanks again for replying.

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...

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 07 December 2011 - 01:23 AM #6

If it is of any help to you (seems to work for me, albeit with other .htaccess/httpd.conf rules implemented, CS-Cart support advised this is the best format to avoid "?sef_rewrite=1" being appended to URL's which are not native to the cart (ie. the URL you are redirecting from is not stored in the necessary SEO-related database table.

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.
Hire StellarBytes for CS-Cart Design & Development Services

 
  • m33
  • Member
  • Members
  • Join Date: 05-Dec 11
  • 37 posts

Posted 07 December 2011 - 02:00 AM #7

Hey Stellar,

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)?

 
  • MrMaster
  • Advanced Member
  • Members
  • Join Date: 05-Mar 13
  • 101 posts

Posted 14 April 2013 - 07:15 AM #8

Hello m33!

Did you solve the problem with /?sef_rewrite=1 ? If yes, please, share your solution :)

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 14 April 2013 - 03:31 PM #9

The easiest solution to 'fix' it is to create your redirects to redirect to the non-SEO friendly URL (eg. index.php?dispatch=page_id=7) which will redirect your old URL from 'my-old-page.html' to 'my-new-page.html' without the 'sef_rewrite', in the URL, however, this defeats the purpose of creating the 301 redirect in the first place and will cause an indefinite loop in some server setups.

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!)
Hire StellarBytes for CS-Cart Design & Development Services

 
  • MrMaster
  • Advanced Member
  • Members
  • Join Date: 05-Mar 13
  • 101 posts

Posted 14 April 2013 - 08:04 PM #10

Thanks! Installed the addon you advised. Hope it will do the thing :)

 
  • m33
  • Member
  • Members
  • Join Date: 05-Dec 11
  • 37 posts

Posted 23 April 2013 - 07:06 PM #11

Hi all,

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.

 
  • cscartrocks
  • Member
  • Members
  • Join Date: 24-Jan 11
  • 1773 posts

Posted 24 April 2013 - 02:31 AM #12

You can do the 301 redirect by inserting the canonical url field(the new url) for disabled category/product. We also have a modified version to allow doing this for active category/product. Just try it and let us what is your needs here.

One Step Checkout Addon - The ultimate checkout experience
Best CS-Cart SEO addon - CS-Cart SEO Ultimate Addon
PM for quality custom work/project


 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11427 posts

Posted 25 April 2013 - 12:34 AM #13

You should be able to request a refund from any reputable cs-cart addon developer. Just do your homework. You can also look at their member status here to get an idea of how involved they've been in the forums and to get an idea of whether they provide solutions or hacks.

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.


 
  • guyrotberg
  • Member
  • Members
  • Join Date: 14-Nov 09
  • 143 posts

Posted 28 April 2013 - 04:25 PM #14

This may be off topic but Tony - your website ez-ms.com is down for the past two days. Is everything OK?

 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11427 posts

Posted 28 April 2013 - 07:44 PM #15

Yeah, my host (to remain nameless) in their attempt to move my VPS to new hardware sent me a note to update my nameservers to new IP addresses. Then once I got mail working again (my mail comes from this VPS) there was a note like "oops, we goofed, returning you to the old VPS". So then the nameservers were out of sync and to make a long store short it took a while to get them to get me the right IP addresses and then for those to propagate.

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.


 
  • malvcomm
  • Junior Member
  • Trial users
  • Join Date: 20-Aug 09
  • 13 posts

Posted 10 May 2013 - 04:07 PM #16

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]

 
  • ferero
  • Advanced Member
  • Trial users
  • Join Date: 25-Apr 15
  • 85 posts

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!



 
  • JackConnick
  • Senior Member
  • Trial users
  • Join Date: 03-Jun 12
  • 300 posts

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 icon_smile.gif) 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



 
  • tbirnseth
  • CS Cart Expert
  • Authorized Reseller
  • Join Date: 08-Nov 08
  • 11427 posts

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.