4 Replies - 154 Views - Last Post: 13 March 2019 - 10:37 AM

#1 pfar54   User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 504
  • Joined: 30-April 15

This test string is not supported: %{HTTP:CF-Visitor} error

Posted 12 March 2019 - 12:55 PM

I am working on optimizing my site with SEO. Someone informed me that my site's redirects are going to both the http and https version of my site. This confused me because I thought I had this under control in my htaccess file. I tested my site's htaccess file at https://htaccess.madewithlove.be/

I received the following error:

Quote

This test string is not supported: %{HTTP:CF-Visitor}


for this line of code:

RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'


Is this an actual error or does the testing site simply not support that condition?


Does anyone see what I could potentially be doing this wrong? BTW - I also tested my site in "Screaming Frog", within the "Response Code" section I do see links going to the http version.

Here is the full code for my htaccess file:

Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\. [NC,OR]
RewriteCond %{HTTP:CF-Visitor} '"scheme":"http"'
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,NE,L]

RewriteCond %{REQUEST_URI} !^/?(php/uploads)/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteRule ^([^\.]+)$ $1.html [NC,L]
#<IfModule mod_rewrite.c>
#RewriteEngine on
#RewriteRule ^/?(.*).(php|html)$ /$1 [R=301,L]

#</IfModule>

ErrorDocument 404 /404error.php

<ifmodule deflate_module.c>
    DeflateCompressionLevel 1
    DeflateBufferSize 8096
    DeflateMemLevel 8
    DeflateWindowSize 8

    # compress text, html, javascript, css, xml:
	AddOutputFilterByType DEFLATE text/plain
	AddOutputFilterByType DEFLATE text/html
	AddOutputFilterByType DEFLATE text/xml
	AddOutputFilterByType DEFLATE text/css
	AddOutputFilterByType DEFLATE text/javascript
	AddOutputFilterByType DEFLATE application/xml
	AddOutputFilterByType DEFLATE application/xhtml+xml
	AddOutputFilterByType DEFLATE application/rss+xml
	AddOutputFilterByType DEFLATE application/javascript
	AddOutputFilterByType DEFLATE application/x-javascript
	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 image/svg+xml
	AddOutputFilterByType DEFLATE image/x-icon
	AddOutputFilterByType DEFLATE font/opentype
	AddOutputFilterByType DEFLATE font/otf
	AddOutputFilterByType DEFLATE font/ttf
</ifmodule>

<IfModule mod_expires.c>
    ExpiresActive On
	##ExpiresDefault A1
	##Header append Cache-Control must-revalidate
    ExpiresByType image/gif A31536000
    ExpiresByType image/jpg A31536000
    ExpiresByType image/jpeg A31536000
    ExpiresByType image/png A31536000
    ExpiresByType image/bmp A31536000
	ExpiresByType image/ico A31536000
	ExpiresByType image/ico A31536000
	ExpiresByType image/icon A31536000
	ExpiresByType image/x-icon A31536000
    ## ExpiresByType text/css A31536000
	ExpiresByType text/css A31536000
    ExpiresByType text/javascript A31536000
    ExpiresByType application/javascript A31536000
    ExpiresByType application/x-javascript A31536000
	
	# Add a far future Expires header for fonts
	ExpiresByType application/vnd.ms-fontobject A31536000
	ExpiresByType application/x-font-ttf A31536000
	ExpiresByType application/x-font-opentype A31536000
	ExpiresByType application/x-font-woff A31536000
	ExpiresByType image/svg+xml A31536000
	
	<FilesMatch "\.(js|css|xml|gz)$">
		Header append Vary: Accept-Encoding
	</FilesMatch>
  
</IfModule>

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

<IfModule mod_headers.c>

    Header set X-Frame-Options DENY
	Header set X-XSS-Protection "1; mode=block"
</IfModule>


Redirect /linear-motion /solution/linear-motion
Redirect /quiz /index
Redirect /answer /index
Redirect /line /index
Redirect /safety-guarding /solution/guarding
Redirect /articles/enclosures /solution/enclosures
Redirect /solution/enclosures/ /solution/enclosures
Redirect solution/guarding/guards-partitions /solution/guarding
Redirect /solution/linear-motion/linear-actuators /solution/linear-motion
Redirect /about-us/t-slot-nuts-fasteners(?:\.html)?$ /components
Redirect /news-events/trade-shows(?:\.html)?$ /events
Redirect /about-us/customer-service(?:\.html)?$ /about
Redirect /about-us/partnerships(?:\.html)?$ /about
Redirect /machining/ /machining
Redirect /guarding/ /solution/guarding
Redirect /material-handling/ /solution/material-handling
Redirect /linear-motion/ /solution/linear-motion
Redirect /workstations/ /solution/workstations
Redirect /structures/ /solution/structures
Redirect /links /index
Redirect /news-events/blog/categories/machine-building.html /index
Redirect /news-events/blog/categories/workbenches.html /solution/workstations
Redirect /news-events/blog/categories/machine-building.html /solution/structures
Redirect /footerTop /index
Redirect /products /catalogs
Redirect /10-linear-motion /solution/linear-motion
Redirect /profile-techical-data /profile-technical-data
Redirect /custom-404=error-page.html /404error
Redirect /news-events/blog.html /learn
Redirect /privacy-policy.html /privacy
Redirect /news-events.html /learn
Redirect /machine-building/workbenches.html /solution/workstations
Redirect /terms-and-conditions.html /terms-conditions
Redirect /about-us/customer-service.html /about
Redirect /about-us/careers.html /careers
Redirect /about-us/partnerships.html /about
Redirect /articles/quote /quote
Redirect /news-events/blog/entry/big-belt-driven-linear-actuators-expand-reach-of-pick-place-system-1(?:\.html)?$ /solution/linear-motion
Redirect /news-events/blog/calendar/2014/10(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2017/4(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2017/1(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2015/10(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2016/1(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2016/2(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2016/4(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2015/12(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2015/7(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2015/6(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2015/8(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2016/10(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2016/3(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2015/3(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2017/3(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2014/11(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2015/9(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2015/5(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2016/7(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2015/1(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2017/6(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2017/2(?:\.html)?$ /index
Redirect /news-events/blog/calendar/2016/5(?:\.html)?$ /index
Redirect /news-events/blog/blogger/eric-allen(?:\.html)?$ /index
Redirect /news-events/blog/tags/workbench-system(?:\.html)?$ /solution/workstations
Redirect /news-events/blog/tags/automation-machines(?:\.html)?$ /solution/material-handling
Redirect /news-events/blog/tags/adjustable-height-workbench(?:\.html)?$ /solution/workstations
Redirect /news-events/blog/tags/belt-driven-linear-actuators(?:\.html)?$ /solution/linear-motion
Redirect /news-events/blog/tags/adjustable-height(?:\.html)?$ /solution/workstations
Redirect /news-events/blog/tags/belt-driven-linear-actuators(?:\.html)?$ /solution/linear-motion
Redirect /news-events/blog/tags/extruded-aluminum-profile(?:\.html)?$ /profile
Redirect /news-events/blog/tags/linear-motion(?:\.html)?$ /solution/linear-motion
Redirect /news-events/blog/tags/university(?:\.html)?$ /index
Redirect /news-events/blog/tags/robotics(?:\.html)?$ /index
Redirect /news-events/blog/entry/adjustable-height-workbenches-building-healthier-and-more-productive-environments(?:\.html)?$ /solution/workstations
Redirect /news-events/blog/entry/partnership-with-rockwell-automation-events(?:\.html)?$ /events
Redirect /news-events/blog/entry/trail-by-digging-kent-state-university-competes-at-nasa-robotic-event(?:\.html)?$ /events
Redirect /news-events/blog/entry/mb-kit-systems-dba-item-north-america-celebrates-20-year-anniversary(?:\.html)?$ /learn
Redirect /news-events/blog/entry/mb-kit-systems-inc-to-discontinue-use-of-item-north-america-name(?:\.html)?$ /index
Redirect /images/Subpage_Images/Events/Safety_Invite_2017_West_APR_MBKit.pdf /index
Redirect /about-us/t-slotted-extruded-aluminum(?:\.html)?$ /profile
Redirect /solution/material-handlingmaterial-handling-carts(?:\.html)?$ /solution/material-handling
Redirect /images/material_handling_brochure.pdf /index
Redirect /contact/newsletter-sign-up/12-machine-building(?:\.html)?$ /index
Redirect /solution/material-handlingmodular-conveyors(?:\.html)?$ /solution/material-handling
Redirect /solution/material(?:\.html)?$ /solution/material-handling
Redirect /solution/guarding/custom-enclosures(?:\.html)?$ /solution/enclosures



Is This A Good Question/Topic? 0
  • +

Replies To: This test string is not supported: %{HTTP:CF-Visitor} error

#2 no2pencil   User is online

  • Professor Snuggly Pants
  • member icon

Reputation: 6747
  • View blog
  • Posts: 31,231
  • Joined: 10-May 07

Re: This test string is not supported: %{HTTP:CF-Visitor} error

Posted 12 March 2019 - 06:26 PM

The way that I would attack this, is in the apache httpd config that binds to port 80, redirect everything to https://, then leave the binding to port 443 alone. I wouldn't do this with .htaccess.
Was This Post Helpful? 0
  • +
  • -

#3 pfar54   User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 504
  • Joined: 30-April 15

Re: This test string is not supported: %{HTTP:CF-Visitor} error

Posted 13 March 2019 - 05:44 AM

View Postno2pencil, on 12 March 2019 - 06:26 PM, said:

The way that I would attack this, is in the apache httpd config that binds to port 80, redirect everything to https://, then leave the binding to port 443 alone. I wouldn't do this with .htaccess.


Thanks for the suggestion. Do you know how to get to this config location in WHM? Here is where I am currently and I do not see any ports anywhere.

Home »Service Configuration »Apache Configuration »Global Configuration
Was This Post Helpful? 0
  • +
  • -

#4 no2pencil   User is online

  • Professor Snuggly Pants
  • member icon

Reputation: 6747
  • View blog
  • Posts: 31,231
  • Joined: 10-May 07

Re: This test string is not supported: %{HTTP:CF-Visitor} error

Posted 13 March 2019 - 06:26 AM

Not sure, I always configure my Apache to use vhosts. For quite awhile now I've put nginx in-front of Apache.
Was This Post Helpful? 0
  • +
  • -

#5 pfar54   User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 504
  • Joined: 30-April 15

Re: This test string is not supported: %{HTTP:CF-Visitor} error

Posted 13 March 2019 - 10:37 AM

Thanks. I reached out to my host. They have to give me access to get into the SSH to change the ports as you recommended. I will update this thread once I am able to get in and try it out.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1