php - replace www with any word and it resolves to the website instead of giving a 404 error -


i have website when type in word in subdomain part of url resolves domain. instance monkey.mysite.com resolves same www.mysite.com or mysite.com would. no matter page on still resolve url. wordpress site , has ssl certificate. infected virus. can explain me cause this?

here rewrite rule in .htaccess file:

    rewritecond %{http_host} ^mysite\.com$ [or]     rewritecond %{http_host} ^www\.mysite\.com$     rewriterule ^/?$ "http\:\/\/mysite\.com" [r=301,l] 

there not subdomain associated site.

this issue not related rewrite rules in apache rather dns settings. if subdomain.mysite.com not have dns record, proper response in browser "server not found" (since ip not resolved) rather http 404 error (i.e. page not found).

anyway, can check response given dns server on mac/linux with,

dig subdomain.mysite.com 

which should return not found if subdomain indeed not exist. alternatively, there tools online.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

node.js - How to abort query on demand using Neo4j drivers -