Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#26 09-15-2015 07:36:53

Malindo
Member
From: London
Registered: 01-13-2014
Posts: 79
Website

Re: Rewriting non-www to www without breaking checkout etc

Hi Nick,

I can understand Fresh Eyes Analysis report and the custom shop job. But what I need now, it is to know how to redirect  my site links from : mysite.com/Item/product_name TO mysite.com/Item/product_name.
I've got in touch with your support team for that but I couldn't get it right.Do I need custom shop for that?

Thanks

Offline

 

#27 09-15-2015 14:04:09

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Rewriting non-www to www without breaking checkout etc

mysite.com/Item/product_name TO mysite.com/Item/product_name

What do you want here?  These are the same.


Nick Hendler

Offline

 

#28 09-16-2015 06:23:58

Malindo
Member
From: London
Registered: 01-13-2014
Posts: 79
Website

Re: Rewriting non-www to www without breaking checkout etc

Hi Nick,

Sorry that was a mistake.
I mean:  mysite.com/Item/product_name ==>  mysite.com/product_name .

Thanks

Offline

 

#29 09-16-2015 09:14:05

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Rewriting non-www to www without breaking checkout etc

Post #22.


Nick Hendler

Offline

 

#30 09-17-2015 06:55:53

Malindo
Member
From: London
Registered: 01-13-2014
Posts: 79
Website

Re: Rewriting non-www to www without breaking checkout etc

Hi Nick,

post 22 say: RewriteRule ^Item/(.*)  https://bikocartridges.com/$1 [L,R=301]
I've made that change and it does not work at all, is there anything I need to know or is it only custom shop that can fix that? This will be very awkward if that is the only solution.

Thanks
Malindo

Offline

 

#31 09-17-2015 09:13:34

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Rewriting non-www to www without breaking checkout etc

Please post your entire .htaccess file here.  You probably have things in the wrong order.  Either way, you shouldn't be replacing your homepage, so other users should stop following this thread right about now.


Nick Hendler

Offline

 

#32 09-19-2015 03:24:29

Malindo
Member
From: London
Registered: 01-13-2014
Posts: 79
Website

Re: Rewriting non-www to www without breaking checkout etc

Thanks for your response,
I hope the .htaccess code will help.

Code:

Options +FollowSymLinks
RewriteEngine on

###
### Rewrite Non-HTTPS Requests
###

RewriteCond %{HTTP_HOST} ^http://bikocartridges\.com
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^Item/(.*)  https://bikocartridges.com/$1 [L,R=301] 


###
### GZIP COMPRESSION (SPEED)
###

  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml

# Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4.0[678] no-gzip
  BrowserMatch bMSIE !no-gzip !gzip-only-text/html
  Header append Vary User-Agent

###
### CACHING (SPEED)
###

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 month"
ExpiresByType image/jpeg "access 1 month"
ExpiresByType image/gif "access 1 month"
ExpiresByType image/png "access 1 month"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 1 days"
</IfModule>

<IfModule mod_deflate.c>

    <IfModule mod_setenvif.c>
        <IfModule mod_headers.c>
            SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
            RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
        </IfModule>
    </IfModule>

    <IfModule mod_mime.c>
        AddEncoding gzip              svgz
    </IfModule>

    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE "application/atom+xml" \
                                      "application/javascript" \
                                      "application/json" \
                                      "application/ld+json" \
                                      "application/manifest+json" \
                                      "application/rss+xml" \
                                      "application/vnd.geo+json" \
                                      "application/vnd.ms-fontobject" \
                                      "application/x-font-ttf" \
                                      "application/x-web-app-manifest+json" \
                                      "application/xhtml+xml" \
                                      "application/xml" \
                                      "font/opentype" \
                                      "image/svg+xml" \
                                      "image/x-icon" \
                                      "text/cache-manifest" \
                                      "text/css" \
                                      "text/html" \
                                      "text/plain" \
                                      "text/vtt" \
                                      "text/x-component" \
                                      "text/xml"
    </IfModule>

</IfModule>


# Version 8 Rewrite Rules
RewriteCond %{HTTPS} !=on
RewriteRule ^/?secure/(.*) https://%{SERVER_NAME}/secure/$1 [R,L]
RewriteRule ^index.php - [L,PT]
RewriteRule ^$ index.php?COREseourl=/ [L,PT]
RewriteRule ^/$ index.php?COREseourl=/ [L,PT]
RewriteRule ^sitemap\.xml utilities/sitemap.xml [L,PT]
RewriteRule ^rss\.xml utilities/rss.xml [L,PT]
RewriteCond %{REQUEST_URI} ^/
RewriteCond %{REQUEST_URI} !\.(xml|css|js|gif|jpg|jpeg|png|pdf)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?COREseourl=/$1 [L,PT]

# Block Russian Referrer Spam
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly.\.ru/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly\.org/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*ilovevitaly\.info/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*iloveitaly\.ru/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*econom\.co/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*savetubevideo\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*kambasoft\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*buttons\-for\-website\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*semalt\.com/ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://.*darodar\.com/ [NC]
RewriteRule ^(.*)$ – [F,L]

Offline

 

#33 09-21-2015 06:39:27

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Rewriting non-www to www without breaking checkout etc

This is a working abbreviated version without the compression and spam rules (just the rules pertinent to SEO, in the right order):

Code:

Options +FollowSymLinks
RewriteEngine on

###
### Rewrite Non-HTTPS Requests
###

RewriteCond %{HTTP_HOST} ^bikocartridges\.com
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)  https://bikocartridges.com/$1 [L,R=301]

### 
### Special Rewrites
### 

RewriteRule ^Item/(.*)  https://bikocartridges.com/$1 [L,R=301]

### 
### Version 8 Rewrite Rules
### 

RewriteRule ^index.php - [L,PT]
RewriteRule ^$ index.php?COREseourl=/ [L,PT]
RewriteRule ^/$ index.php?COREseourl=/ [L,PT]
RewriteRule ^sitemap\.xml utilities/sitemap.xml [L,PT]
RewriteRule ^rss\.xml utilities/rss.xml [L,PT]
RewriteCond %{REQUEST_URI} ^/
RewriteCond %{REQUEST_URI} !\.(xml|css|js|gif|jpg|jpeg|png|pdf)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?COREseourl=/$1 [L,PT]

Nick Hendler

Offline

 

#34 09-22-2015 03:23:46

Malindo
Member
From: London
Registered: 01-13-2014
Posts: 79
Website

Re: Rewriting non-www to www without breaking checkout etc

Hi Nick,

Thanks it is working now,I 've got the links as wanted.But my home page shows error 404 (not found). I've already got to this issue when the support team asked me to make some changes with core_namespaces.
Could you tell me how to get my splash page working ?

Thanks

Offline

 

#35 09-22-2015 06:25:45

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Rewriting non-www to www without breaking checkout etc

I'm assuming at some point you made the ecom.prodshow (/Items) namespace use / as the SEOurl, and changed the cms.display namespace to use some SEOurl other than /.  Assuming you used /Page for the cms.display namespace, you could modify the .htaccess file in post 33 with:

Code:

RewriteRule ^$ index.php?COREseourl=/ [L,PT]
RewriteRule ^/$ index.php?COREseourl=/ [L,PT]

Becomes:

Code:

RewriteRule ^$ index.php?COREseourl=/Page/splash [L,PT]
RewriteRule ^/$ index.php?COREseourl=/Page/splash [L,PT]

Nick Hendler

Offline

 

Board footer