This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 1991, 1993 | |
* The Regents of the University of California. All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* 1. Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. | |
* 2. Redistributions in binary form must reproduce the above copyright |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let apache know we're behind a SSL reverse proxy | |
SetEnvIf X-Forwarded-Proto "https" HTTPS=on | |
# Redirect to HTTPS | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC] | |
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
</IFModule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Updated queries for a bedrock-setup which doesn't use the default path settings | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'href="https://your-domain.tld/app/uploads/', 'href="https://your-cdn-url.tld/'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'src="https://your-domain.tld/app/uploads/', 'src="https://your-cdn-url.tld/'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'https://your-domain.tld/app/uploads/', 'https://your-cdn-url.tld/'); | |
-- Plugins/Themes that use wp_options to store settings like logo file, etc. | |
UPDATE wp_options SET option_value = REPLACE(option_value, 'https://your-domain.tld/app/uploads/', 'https://your-cdn-url.tld/'); | |
--- VisualComposer custom CSS | |
UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'https://your-domain.tld/app/uploads/', 'https://your-cdn-url.tld/') WHERE meta_key = '_wpb_shortcodes_custom_css'; |
OlderNewer