Jump to content

Ssl .htaccess Redirect


Recommended Posts

Hi all

 

I would like to redirect all traffic from http://www.mysite.com/survey to https://www.mysite.com/survey

 

I have added the following line to the root htaccess file

 

RewriteRule ^survey/?$ "https\:\/\/www\.mysite\.com\/survey\/" [R=301,L]

 

but it does nothing at all, I have also tried the above without the escape characters.

 

Do I need to add anything to the htaccess file in the survey folder as well?

 

Thanks in advance

Link to post
Share on other sites

You can try the following in a .htaccess file inside your survey folder with no rewrite rules for it in your root .htaccess

 

>RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...