.htaccess https redirect best method
- by Douglas Cottrell
I have searched through all the redirects posted buy others and cant quite find the answer to my problem.
I have a website with over 3000 pages and we are getting duplication issues within google.
We want to keep everything in the parent directory to be http except our contact.php and login.php page.
We then have 3 folders that must be secured. admin, clients, customers
I have tried using the following code in seperate .htaccess files for each folder, but I keep getting a conflict when I try and I am still trying to find a good solution for the home directory.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} admin
RewriteRule ^(.*)$ https://www.website.com/$1 [R,L]
Any help would be greatly appreciated.