Jump to content

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

What Would Cause html?sef_rewrite=1 in URL? Rate Topic   - - - - -

 

Posted 31 August 2009 - 08:18 PM #1

In looking through my stats today I noticed that someone landed on a page like this:

http://www.mysite.co...l?sef_rewrite=1

What would cause this and how do I stop it?

 

Posted 31 August 2009 - 08:46 PM #2

Actually, upon further testing, I see that all my URLs that are being redirected from my old shopping cart to CS-Cart are doing this. In other words, when someone requests:

http://www.mysite.co...roduct-name.php

my .htaccess 301 redirect sends them to:

http://www.mysite.co...oduct-name.html

but for some reason ?sef_rewrite=1 is being added.

Help!

 

Posted 31 August 2009 - 11:35 PM #3

Also, I notice that this has only started happening TODAY! Weird. If I look at yesterday's statistics (and before), there are no sef_rewrites in my URLs. What could have changed?

 
  • snorocket
  • Forum Janitor
  • Members
  • Join Date: 15-Mar 06
  • 2519 posts

Posted 01 September 2009 - 05:34 AM #4

my stats have shown this for a long time, I'm not sure why it shows in the url but my pages load fine so I'm not too worried about it...
SNOROCKET.COM, Now Accepting PRE-ORDERS:
Customer Service (Helpdesk) Addon for CS-Cart v4.3.1
Quote and Invoicing Addon for CS-Cart v4.3.1

 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3365 posts

Posted 01 September 2009 - 05:43 AM #5

?sef_rewrite=1 generated with incorrect / wrong redirect

For example:
Redirect 301 /category.html http://www.domain.com/category/

Good example (working with cs-cart):
RewriteCond %{REQUEST_URI} .*\/category\.html
RewriteRule ^.*$ http://www.domain.com/category/ [L,R=301]

below

RewriteBase /


 
  • martynb
  • Junior Member
  • Members
  • Join Date: 02-Sep 09
  • 22 posts

Posted 03 September 2009 - 10:46 PM #6

I'm experiencing the same problem, I've sucessfully move the cart from a previous cart and all urls are now updated but all feature sef_rewrite=1

The old categories had a stucure of /shop/1/2/3/ whats the best way to 301 these as I get a 500 server error.

Thanks

 

Posted 03 September 2009 - 10:52 PM #7

Here is the reply I got from CS-Cart support helpdesk:

The "?sef_rewrite=1" code was added to your links due to the conflicts between the "Redirect" option added by and the standard rewrite rules in ".htaccess" file of CS-Cart. These rules are added in order to provide the functionality of the "SEO" addon.
Please let me note, that there is no problem when using the standard ".htaccess" file.
I can offer you to replace this part of the code (as an example) in your ".htaccess" file:
RedirectMatch permanent ^/product-page.php$ http://www.domain.co...oduct-page.html

with this one:
RewriteCond %{REQUEST_URI} .*\/product-page\.php
RewriteRule ^.*$ http://www.domain.co...oduct-page.html [L,R=301]

and place it before this part of the code:
RewriteBase /

In this case the "?sef_rewrite=1" code will not be added to your links.
These changes work with all URLs in standard CS-Cart.
But please let me note, that these changes do not work for URL with any parameters at the end of the link in your case (for example product-page.php?pg=2)


I think this is the same as Darius mentions above, though support tells me to put RewriteBase/ under the redirects, whereas Darius says to put it above. I am busy re-doing all my thumbnail images at the moment, but when I get done with that, I will test this solution to see how it works out.

 
  • nodame
  • Senior Member
  • Members
  • Join Date: 20-Feb 09
  • 149 posts

Posted 04 September 2009 - 08:31 AM #8

Looking at Darius's redirect makes me want to raise another point.

I personally feel in the first place CS-cart should not have permanently fixed the SEO function such that the ".html" extension is necessary. (It was not that way in v1.3.5, where the ".html" can be commented off and the SEO still works fine).

The ".html" extension is really quite old-schooled. And one of the criteria for search engines SEO besides readable URLs is that the shorter the URL's the higher the natural rank.

Almost all SEO rewrites in CMS nowadays do not ends with an extension since pages are generated dynamically nowadays.
But well just my personal opinion.

Back to the thread's point, I've added this rewrite rule to my htaccess to prevent exploits, since I've noticed this particular exploits attempts in the error logs of my site, and just want to redirect it away without it having to even register in my error logs.
RewriteBase /

#PREVENT QUERY STRING EXPLOITS
RewriteCond %{QUERY_STRING} mosConfig [NC]
RewriteRule ^(.*)$ - [F,L]
But unfortunately, it also create this sef_rewrite=1 problem for me.

 
  • Darius
  • Douchebag
  • Members
  • Join Date: 20-Apr 08
  • 3365 posts

Posted 04 September 2009 - 12:14 PM #9

I personally feel in the first place CS-cart should not have permanently fixed the SEO function such that the ".html" extension is necessary. (It was not that way in v1.3.5, where the ".html" can be commented off and the SEO still works fine).


Page cannot be accessed as
/category/
/category
/category.html

This is wrong, a duplicate page generator, main reason for low serps

A way to select this in seo mod would be great.

 

Posted 18 May 2011 - 09:58 AM #10

Did anybody have any solution for this redirecting extra code been added to the urls

please share with us.

many thanks

 
  • DawnG
  • Senior Member
  • Members
  • Join Date: 02-Jun 09
  • 330 posts

Posted 19 May 2011 - 12:56 PM #11

I have one even better. My current urls are showing up like this in the SE crawls:
/beach-bungalow-birdhouse-centerpiece-pr-17715.html?sef_rewrite=1¤cy=USD

I know all this is killing my SEO. I am now seeing almost all the pages crawled with currency coding after it like this. I REALLY need some help ! PLEASE :confused:

 

Posted 21 May 2011 - 02:16 PM #12

DawnG , I can try your FTP because i have solved mine :-) info@thewebdevelopmentservices.com


I have one even better. My current urls are showing up like this in the SE crawls:
/beach-bungalow-birdhouse-centerpiece-pr-17715.html?sef_rewrite=1¤cy=USD

I know all this is killing my SEO. I am now seeing almost all the pages crawled with currency coding after it like this. I REALLY need some help ! PLEASE :confused:



 
  • Triplex
  • Senior Member
  • Members
  • Join Date: 12-Mar 08
  • 622 posts

Posted 21 May 2011 - 05:00 PM #13

DawnG , I can try your FTP because i have solved mine :-) info@thewebdevelopmentservices.com


Why you need a ftp from somebody, why you arent share here the solution?

 

Posted 22 May 2011 - 06:11 AM #14

Because solution is listed in this page only already , and you are unable to see it :-)

Why you need a ftp from somebody, why you arent share here the solution?



 

Posted 21 June 2011 - 03:44 AM #15

another indian spammer or scam site?
CS 4.3.9

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

Posted 22 November 2011 - 11:33 AM #16

I also have this too, but it's a very strange one.

I have redirects set up in .htaccess like so:

redirect 301 /products/Product-Name.html http://www.domain.com/product-name.html
and
redirect 301 /categories/Category-Name/ http://www.domain.com/category-name/

However, both these produce "?sef_rewrite=1" at the end of the URL's.

I have had to use a php redirect to redirect Uppercase characters in the URL to Lowercase, because, without it, the redirects above work like this:

/products/Product-Name.html redirects to http://www.domain.com/Product-Name.html

This is not valid and produces a 404. With the strtolower php function, I can get this to output .com/product-name.html - but only at the expense of adding "?sef_rewrite=1" to the end of URL's.

CS-Cart support have recommended:

RewriteCond %{REQUEST_URI} .*\/categories\/Category-Name\/
RewriteRule ^.*$ http://www.domain.com/category-name/ [L,R=301]

This is in effect doing the same job as the redirect above, however, I would have to do this for every category/product URL.

I would much prefer, in the same 'working' format which CS-Cart have provided, a way to strip '/category' and '/products' AND convert uppercase to lowercase, or at least find a reason why CS-Cart is making these redirects go from .com/category-name/ to .com/Category-Name/ and causing a 404 error.

Any ideas?
Hire StellarBytes for CS-Cart Design & Development Services

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

Posted 22 November 2011 - 10:32 PM #17

I believe it is because it's not finding 'category-name' as an SEO name that relates to a category. Just a guess.

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.


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

Posted 22 November 2011 - 11:15 PM #18

I believe it is because it's not finding 'category-name' as an SEO name that relates to a category. Just a guess.

That's what I was thinking, but I can't enter the relevent Dispatch Value and SEO Name into Website>SEO Rules, nothing happens.

I tried:
Dispatch Value
/categories/Category-Name/
SEO Name:
category-name/

When I save, it changes the SEO Name to 'category-name-en'

Yet it still produces domain.com/category-name?sef_rewrite=1


CS-Cart say this will be a custom development job - it does leave me wondering how they expect their potential customers to move from an existing cart to CS-Cart.
Hire StellarBytes for CS-Cart Design & Development Services

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

Posted 22 November 2011 - 11:29 PM #19

It will append the '-en' if there's another entry of the same 'type' with the same 'name'. Look it up in cscart_seo_names and then go find the item it refers to. If it's valid then all is well. If it's not, manually delete the entry and save the item again.

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.


 
  • termalert
  • Senior Member
  • Members
  • Join Date: 14-Jan 09
  • 983 posts

Posted 08 December 2019 - 02:30 AM #20

Same thing happened to me. All my 'preview' page links plus 'preview' new products went straight to my home page

When I hovered over the preview link I would see

https://www.mydomain...te-windows.html at the lower left ( which looked weird of itself )

yet when I clicked I was taken to my home page

https://www.mydomain.../?sef_rewrite=1

 

All the solutions in this thread messed with my head and as I only have

3 main product lines I disabled the SEO add on and all is well now.