Skip to main content

Redirect Wildcards

Comments

3 comments

  • nixuser
    Can you please paste the rule here.
    0
  • PluggedP93
    This is the rule that was tried from the article: RewriteEngine on RewriteBase / #for all requests on xyzname.com RewriteCond %{HTTP_HOST} xyzname\.com$ [NC] #if they are not for the www.xyzname.com RewriteCond %{HTTP_HOST} !^www\.xyzname\.com$ [NC] #301 redirect to www.xyzname.com RewriteRule (.*) http://www.xyzname.com/$1 [R=301,L]
    0
  • cPanelLauren
    Hello @PluggedP93 There's a pretty good few discussions on this issue here: Subdomains that don't exist are indexed by Google - Zombie subdomain removal via .htaccess But the rule listed should work as well, potentially with some modification to https if you're using it (which most everyone at this point should be). The change via google won't happen overnight though.
    0

Please sign in to leave a comment.