WordPress.org

Ready to get started?Download WordPress

Forums

Changing htaccess fine to redirect to https (12 posts)

  1. emptyvessal
    Member
    Posted 2 years ago #

    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

  2. Tim S
    Member
    Posted 2 years ago #

    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?

  3. MickeyRoush
    Member
    Posted 2 years ago #

    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]

  4. mikules
    Member
    Posted 2 years ago #

    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.

  5. MickeyRoush
    Member
    Posted 2 years ago #

    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?

  6. emptyvessal
    Member
    Posted 2 years ago #

    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

  7. emptyvessal
    Member
    Posted 2 years ago #

    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 !

  8. emptyvessal
    Member
    Posted 2 years ago #

    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

  9. emptyvessal
    Member
    Posted 2 years ago #

    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

  10. emptyvessal
    Member
    Posted 2 years ago #

    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?????

  11. emptyvessal
    Member
    Posted 2 years ago #

    anyone ?

  12. MickeyRoush
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic