Hi guys,
I am pulling my hair with this redirect issue and hope you guys can shed some light on this.
Situation: Just took over a site that was switched to WP from aspx on April 1st. One of the issue of the site is that is has both http and https versions competing for the same content. The site has about 380 pages and Google has indexed about half under http and the other half under https. For consistency sake and to prevent duplicate content issue, I want the site to display http except for the couple of pages that actually need encryption.
I tried 2 or 3 different rules but none of them work completely. The closest I've got is that the home page of https now redirects but none of the inner pages do. Here is the top of my HTaccess file:
I've tried using:# BEGIN wordpress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTPS} =on
RewriteRule ^(.*) http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</IfModule>
# END wordpress
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.pardonservicescanada.com$ [NC]
RewriteRule ^(.*)$ http://pardonservicescanada.com/$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTPS} =on
RewriteRule ^(.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
as well asRewriteEngine On
RewriteCond %{HTTPS} =on
RewriteRule ^(.*) http://%{SERVER_NAME}/$1 [R=301,L]instead ofhttp://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]but same results.{HTTP_HOST}%{REQUEST_URI}
Two weird things:
1) If I remove
The https rule works for inner pages but the http pages can't load anymore.# BEGIN wordpress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTPS} =on
RewriteRule ^(.*) http://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</IfModule>
# END wordpress
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.pardonservicescanada.com$ [NC]
RewriteRule ^(.*)$ http://pardonservicescanada.com/$1 [R=301,L]
2) If I remove the entire content of the htaccess
The www to non www and index.php to / redirects still work. There is also no robots.txt file in the root folder but I can see one online. When I add my own, it changes the one that online.
Anyway, I've spent the whole afternoon and most of the morning on this issue and no luck so far.
Any ideas please?
Submit Your Article
Forum Rules

