Hi All
I'm trying to force https for a certain directory:
/special_dir
I also want to factor in calls for both
www.domain.com/special_dir
domain.com/special_dir
Thus, anything to:
http://www.domain.com/special_dir
http://domain.com/special_dir
would be redirected to:
https://www.domain.com/special_dir
I have tried the following in htaccess, but I get a browser error stating that I don't have permission to access that area
# Redirect http:// to https://www.
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R=permanent,L]
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^www.domain\.com$ [NC]
RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R=permanent,L]
Can anyone see how to correct this? Many thanks
------------------------------------------
I'm trying to force https for a certain directory:
/special_dir
I also want to factor in calls for both
www.domain.com/special_dir
domain.com/special_dir
Thus, anything to:
http://www.domain.com/special_dir
http://domain.com/special_dir
would be redirected to:
https://www.domain.com/special_dir
I have tried the following in htaccess, but I get a browser error stating that I don't have permission to access that area
Code:
RewriteEngine On # Redirect http:// to https://www.
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R=permanent,L]
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^www.domain\.com$ [NC]
RewriteRule ^.*$ https://www.domain.com%{REQUEST_URI} [R=permanent,L]
Can anyone see how to correct this? Many thanks
------------------------------------------