Timeline for HTTP website redirect all except 1 file to https
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 19, 2022 at 0:41 | comment | added | Dtor | Wayne, many thanks for all the help! I like the solution you put together, was very easy to follow and works! | |
Oct 19, 2022 at 0:40 | vote | accept | Dtor | ||
Oct 19, 2022 at 0:08 | history | edited | Wayne Smith | CC BY-SA 4.0 |
deleted 62 characters in body
|
Oct 18, 2022 at 23:59 | history | edited | Wayne Smith | CC BY-SA 4.0 |
edited body
|
Oct 18, 2022 at 23:48 | history | edited | Wayne Smith | CC BY-SA 4.0 |
added 61 characters in body
|
Oct 18, 2022 at 23:40 | comment | added | Wayne Smith | @Dtor Oops, I missed that; thank you. The rewritecond is the same as I would use although there are others and we can use it as the third condition of this htaccess. The %{HTTP_HOST} has already become true for this htaccess because we simplified the solution in creating a /port80-somesite.com/ directory. Port 80 is HTTP_HOST and Port 443 is the HTTPS host. No need for using HTTP_HOST with this simplified solution. | |
Oct 18, 2022 at 23:30 | history | edited | Wayne Smith | CC BY-SA 4.0 |
added 3105 characters in body
|
Oct 18, 2022 at 15:13 | comment | added | Dtor | Looking around, I added these lines to the end of the port80 .htaccess (seems to fix the 1 problem, please let me know if it might cause some other issue): RewriteCond %{HTTP_HOST} somewhere\.com [NC] RewriteCond %{REQUEST_URI} ^/$ RewriteRule ^(.*)$ somewhere.com [L,R=301] | |
Oct 18, 2022 at 14:55 | comment | added | Dtor | Also, could you explain the bottom 3 lines of the port80 .htaccess? Would like to better understand what they're doing | |
Oct 18, 2022 at 14:53 | comment | added | Dtor | Thanks Wayne, this looks to work but I'm having 1 issue. If I navigate directly to http:// somewhere.com, it does not get redirected and I get a "Not Found\nThe requested URL / was not found on this server." If I navigate to http:// somewhere.com/index.html it redirects correctly. Is there something I can add so that just http:// somewhere.com gets redirected? (added spaces after http:// because it was auto removing it and turning into a link) | |
Oct 15, 2022 at 3:43 | history | edited | Wayne Smith | CC BY-SA 4.0 |
added 22 characters in body
|
Oct 15, 2022 at 2:53 | history | edited | Wayne Smith | CC BY-SA 4.0 |
Formating the aside note on CentOS
|
Oct 15, 2022 at 2:37 | history | edited | Wayne Smith | CC BY-SA 4.0 |
Changed to friendly directory naming and corrections from unfriendly naming, noted another .conf may be involved on this CentOS 8 installation.
|
Oct 15, 2022 at 2:31 | history | edited | Wayne Smith | CC BY-SA 4.0 |
added 261 characters in body
|
Oct 15, 2022 at 2:18 | history | edited | Wayne Smith | CC BY-SA 4.0 |
added 10 characters in body
|
Oct 15, 2022 at 2:08 | history | edited | Wayne Smith | CC BY-SA 4.0 |
added 30 characters in body
|
Oct 15, 2022 at 2:00 | history | answered | Wayne Smith | CC BY-SA 4.0 |