1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 SSL Install Help....

Discussion in 'Troubleshooting and Problems' started by MattH, Jan 29, 2015.

  1. MattH

    MattH Active Member

    I've been reading around old threads, but can't seem to figure this one out. I've installed the cert, and I've changed the base to https:// in ACP, but when I type in https://forum it reverts to http://

    I wonder if it might be due to a root redirect from www. to http://? Here is the root .hta the site is multisite with forum installed as a sub directory domain/forum

    RedirectMatch 301 ^/subblog1/([0-9]{4})/([0-9]{2})/(.*)$ http://domain.com/subblog1/$3
    RewriteEngine on

    RewriteCond %{HTTP_HOST} ^domain\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.domain\.com$
    RewriteRule ^blog\/category\/inv\/$ "http\:\/\/domain\.com\/products\/post1\-an\-introduction\-and\-analysis\/" [R=301,L]

    # Use PHP5 Single php.ini as default
    #AddHandler application/x-httpd-php5s .php

    RewriteCond %{REQUEST_URI} !^/forum

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteRule wp-content/thesis/skins/(.*)/css.css wp-admin/admin-post.php?action=thesis_do_css
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    # END WordPress
    </IfModule>

    Any thoughts on how to get it to stick on https:// ?
     
  2. shimabuku

    shimabuku Member

  3. MattH

    MattH Active Member

  4. rainmotorsports

    rainmotorsports Well-Known Member

    I want to take the time to say maybe @MattW can help. You guys and your names.

    If you aren't forcing https, then any link or rewrite to http is going to cause it to go to http. You have a rewrite to http in there so at some point when that rule is run the url will go from https to http.
     
  5. MattW

    MattW Well-Known Member

    You are forcing everything to http with that 301 redirect at the end of the first rewrite rule.
     
  6. MattH

    MattH Active Member

    Do you mean this as the first one?

    Code:
    RewriteRule ^blog\/category\/inv\/$ "http\:\/\/domain\.com\/products\/post1\-an\-introduction\-and\-analysis\/" [R=301,L]
    If so, that should only be targeting a single wordpress post... I can take it out.
     
  7. MattH

    MattH Active Member

    OK So I took out the (what I think?) first RW rule and now have:

    RedirectMatch 301 ^/subblog1/([0-9]{4})/([0-9]{2})/(.*)$ http://domain.com/subblog1/$3
    RewriteEngine on

    # Use PHP5 Single php.ini as default
    #AddHandler application/x-httpd-php5s .php

    RewriteCond %{REQUEST_URI} !^/forum

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteRule wp-content/thesis/skins/(.*)/css.css wp-admin/admin-post.php?action=thesis_do_css
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    # END WordPress
    </IfModule>

    However, it still isn't allowing me to type in https://domain.com/forum

    I've not added in the force redirect, but something seems to be redirecting me and I'm still not sure what it might be?
     
  8. MattH

    MattH Active Member

    Another quick question...

    If I have media gallery as an addon where/how would I change the images to display through https:// ? doesn't that require an edit to avoid pushing mixed content (http/https)?
     
  9. Mike

    Mike XenForo Developer Staff Member

    The gallery is served through relative links, so no changes would normally be necessary.
     
  10. MattH

    MattH Active Member

    Yep, just cleaned up some other conflicts, but there seems to be no issues with the gallery. Thanks very much.
     

Share This Page