website-repair-templates

Website Repair Templates

Suggestions for website repair templates

 

.htaccess

For a basic site (not Multi-site) More details are here

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

add to above content of .htaccess but between the #wordpress markers to force https – Adjust the domain to your domain

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

AND, modify wp-admin.php to include the following, just above the line that says “/* That’s all, stop editing! Happy blogging. */”

define(‘FORCE_SSL_ADMIN’, true);

If you have full control of your website (dashboard) and want to ensure the site address cannot be hi-jacked, then add these two line to your wp-config.php
just above the define(‘FORCE_SSL_ADMIN’, true); line AFTER you have checked the settings in your WP Dashboard Settings/General link

define(‘WP_HOME’,’https://example.com’);
define(‘WP_SITEURL’,’https://example.com’);

Obviously, change the example.com to your domain, or subdir with domain.com/subdir as an example.