Hi all,
I need help on setting up MaxCDN. There's a tutorial in MaxCDN about adding canonical tags using .htaccess for SEO purposes. I'm kinda dumb on this and need some advice/ help on what's all this about. From the code I can guess that it directs .htaccess to label all those cached file with canonical tag. But that's my guess. I need some verifications from you expert. (to correct whatever wrong you see)
Currently my site is optimized by Yoast WordPress SEO and I can see the plugin adding canonical tag on every pages. Therefore do I need those extra code in .htaccess as recommended in MaxCDN's tutorial?
Below is the code, and here is the link to the tutorial page - http://support.maxcdn.com/howto/use-seo-with-cdn/
Any words would be much appreciated.
Thanks!
I need help on setting up MaxCDN. There's a tutorial in MaxCDN about adding canonical tags using .htaccess for SEO purposes. I'm kinda dumb on this and need some advice/ help on what's all this about. From the code I can guess that it directs .htaccess to label all those cached file with canonical tag. But that's my guess. I need some verifications from you expert. (to correct whatever wrong you see)
Currently my site is optimized by Yoast WordPress SEO and I can see the plugin adding canonical tag on every pages. Therefore do I need those extra code in .htaccess as recommended in MaxCDN's tutorial?
Below is the code, and here is the link to the tutorial page - http://support.maxcdn.com/howto/use-seo-with-cdn/
Code:
<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>
Any words would be much appreciated.
Thanks!