View Full Version : redirect using htaccess only redirects homepage

06-23-2011, 04:56 PM

Just used some coding to redirect http to https, but it only works on the homepage. When I click on a link to another page on the website it's showing a 404. How can I redirect the entire site to https properly?

06-25-2011, 04:32 PM
Try this

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on

# Redirecting http to https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.mydomain.com/ [R=301,L]

06-26-2011, 10:04 PM
hi Teclib,

Sorry, forgot to tell you that it's a wordpress site.
I tried your code, but probably because of wp it didn't work.

I'm still having the 404 problem.

06-30-2011, 10:27 PM
Problem solved, guys. It was a setting I had to change within WP.

08-10-2011, 09:23 AM
hi techlib,

can you please say how to write .htaccess for redirecting my whole site into another domain