WordPress.org

Ready to get started?Download WordPress

Forums

HTTPS Redirect changing subdomain URL (2 posts)

  1. Amber
    Member
    Posted 1 year ago #

    I have an SSL set up on my domain ( http://www.domain.com ). My WP is installed in it's own directory but running from my root directory.

    I found reference to making my WP auto-load with HTTPS on the forms and added the following to my .htaccess (in my root directory) for WP right under RewriteEngine On :

    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://www.domain.com/$1 [R,L]

    I have a few non-wp subdomains, however now when I start using them, they are not pointing at subdomain.domain.com but instead https://domain.com/subdomain/

    Can anyone advise on a way to correct this that filters my subdomains out of the HTTPS structure?

    Thanks

  2. Amber
    Member
    Posted 1 year ago #

    I resolved this by adding the following in my .htaccess under my RewriteEngine On:

    RewriteCond %{SERVER_PORT} 80
    RewriteCond %{HTTP_HOST} !^(demo|demo2)\.creativecollab\.com$ [NC]
    RewriteRule ^(.*)$ https://www.demo.com/$1 [R,L]

    That successfully excluded my subdomains from loading the https url.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.