Support » Fixing WordPress » Changing htaccess fine to redirect to https

  • RewriteEngine On

    RewriteCond %{HTTP_HOST} ^vitalherbs.co.uk$ [NC,OR]
    RewriteCond %{HTTP_HOST} ^www.vitalherbs.co.uk$ [NC]
    RewriteCond %{REQUEST_URI} !^/website/
    RewriteRule ^(.*)$ /website/ [L]

    my current htaccess
    what needs to change to make it redirect to https?

    Please help me im crying inside ! Just want my site secure. stuggerling

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi emptyvessal,

    See if this link helps you out

    http://noctis.de/archives/11-Using-WordPress-with-SSL.html

    Are you trying to force your whole site over SSL or just your login and admin?

    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule .* /website/$1 [R=301,L]

    **NOTE**
    Where /website/ is your actual SSL website:
    example:
    RewriteRule .* https://vitalherbs.co.uk/$1 [R=301,L]

    Since I don’t know your exact target you could try:

    RewriteCond %{SERVER_PORT} !=443
    RewriteRule .* https://%{HTTP_HOST}/$1 [R=301,L]

    DO NOT use this METHOD if are not using IE. You will NOT be able to upload images to your articles.

    Chalk up another fail to WordPress for using flash uploader.

    DO NOT use this METHOD if are not using IE. You will NOT be able to upload images to your articles.

    Which method? And how so?

    sorry for the late reply i would like my main page and my checkout to be encrypted , thought i had it for a while but then it reverted back to being not encrypted its very odd! will try above methods and let you guys know if it works! if not please get back to me for more help as this has been doing my head in for a week now . Neal

    Ps i installed my wordpress into a folder called website why i dont know. Will this effect the code i need to put in? as when my page loads the adress is vitalherbs.co.uk/website should i be using that instead of vitalherbs.co.uk? sorry im am a bit crap at this !

    sorry more questions when i change the htaccess file do i need my url in general settings to be https or http? will this effect the redirect code? just trying to figure out if im doing anything wrong some where

    MickeyRoush i tried your code but it flashes quicly in browser its secure but after the page loads fully it reverts back to saying not encrypted ! agghhhhh

    another question which htaccess file do i change? i have one in the folder i installed wordpress eg public_html/website/ or in previous page public_html/ . Maybe i have been changing the wrong one?????

    anyone ?

    emptyvessal

    another question which htaccess file do i change? i have one in the folder i installed wordpress eg public_html/website/ or in previous page public_html/ . Maybe i have been changing the wrong one?????

    That’s possible. Have you set WordPress up to force SSL within wp-config.php?

    http://codex.wordpress.org/Administration_Over_SSL

    I’ve never been satisfied setting up WordPress with SSL. But everyone has different set ups. So you just have to keep trying ’till you find out what works for you.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Changing htaccess fine to redirect to https’ is closed to new replies.