Yup, have a default htaccess file. simple stuff. I don’t have access to the config.php, but I have can view the server.apache file, what is strange is that there are two ServerAlias entries:
example.com
https://www.example.com
Not sure if this is a potential issue or just allows either prefix domain to work.
Normal stuff in the htaccess:
<IfModule mod_deflate.c>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
<IfModule mod_mime.c>
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml
</IfModule>
</IfModule>
IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteEngine on
Not sure why there would be two RewriteEngine on statemenets… just need one.
Aside from basic google analytics, there are no SEO modules, so no redirect there.
Every other site I have done have both the site address and wordpress address as the same. The only way the site will work (with correct links to images) is if the WP url is example.com and the site address is https://www.example.com
Which totally baffels me, the wordpress url should be different only to direct the WP install to a different directory (other than the root directory). So adding www in front of the wordpress address creates the problem of all media having an extra https://www.www.example.com/path.to.media…
Could it have been that at some point in the past the database was changed for all media, sort of a search and replace?
What scares me is that there is an inactive plugin called Velvet Blues Update URLs. It was written to update permalinks and urls embedded in content. If someone used this in the past and rewrote all the images to https://www.example.com, then they are hardcoded in the database that way.
This makes the most sense with the extra https://www.www.whatever
I tried to verify hard coded links by looking at the database with the wordpress address with and without www. I found links in the db had https://www.www wiht the WP address set to https://www.example.com, and links has a single www. with the WP address as example.com.
Why would anyone do this? and how to fix it?