Quantcast
Channel: BulletProof Security Forum » All Posts
Viewing all articles
Browse latest Browse all 12461

MaxCDN htaccess code – how and where to add MaxCDN htaccess code

$
0
0

Email Question:

Hope you are doing well. I installed MaxCDN for my site. To avoid SEO issues, they suggested to add the following code. Where should I put it? Thank you
Below is the example of htaccess code you should be using to send canonical header to CDN when origin domain is “domain.com”:

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|webp|html)(\.gz)?(\?.*)?$">
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule .* - [E=CANONICAL:http://%{HTTP_HOST}%{REQUEST_URI},NE]
RewriteCond %{HTTPS} =on
RewriteRule .* - [E=CANONICAL:https://%{HTTP_HOST}%{REQUEST_URI},NE]
</IfModule>
<IfModule mod_headers.c>
Header set Link "<%{CANONICAL}e>; rel=\"canonical\""
</IfModule>
</FilesMatch>

Viewing all articles
Browse latest Browse all 12461

Trending Articles