Main page loads but the subdomains cause a 404 error.
-
So I am not a developer by any means, maintaining my company’s website just fell into my lap. Recently we switched to a new hosting provider. The website in question is https://www.options-inc.org. I thought I did the site migration correctly, but now elements to the site are broken. The website itself loads, but all of the subdomains are broken. Yesterday in the migration I received several errors when uploading our database to MyPHPAdmin, but I am not sure if this is related. I also noticed, that the error page that appears when you click on a subdomain mentions the .htaccess file. I have made some modifications to this file to allow for gzip, and I am not sure if this is related. I tried troubleshooting the problem by just replacing the .htaccess file with a basic one, but the problem was still present.
The way my .htaccess is setup is like this:
‘# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript#Gzip
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>
#End Gzip<FilesMatch “\\.(js|css|html|htm|php|xml)$”>
SetOutputFilter DEFLATE
</FilesMatch><IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule># 480 weeks
<FilesMatch “\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$”>
Header set Cache-Control “max-age=290304000, public”
</FilesMatch># 2 DAYS
<FilesMatch “\.(xml|txt)$”>
Header set Cache-Control “max-age=172800, public, must-revalidate”
</FilesMatch># 2 HOURS
<FilesMatch “\.(html|htm)$”>
Header set Cache-Control “max-age=7200, must-revalidate”
</FilesMatch>## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 2 days”
</IfModule>
## EXPIRES CACHING ##<FilesMatch “\.(?i:php)$”>
<IfModule !mod_authz_core.c>
Order allow,deny
Deny from all
</IfModule>
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
</FilesMatch># END WordPress’
So is this a .htaccess problem, a database issue, am I just dumb (answer: more than likely yes), or is there something else wrong?
Thank you for your time.
- The topic ‘Main page loads but the subdomains cause a 404 error.’ is closed to new replies.