Search the Community

Showing results for tags 'rewritecond'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Hawk Host Announcements
    • Announcements
    • Network and Server Status
  • Hawk Host General
    • Sales Questions
    • Suggestions
    • Customer Reviews
    • Hawk Host Affiliate
  • Hawk Host Products
    • Shared Hosting
    • Reseller Hosting
    • Managed Hosting
    • Virtual Private Servers
    • Frog Host
  • General Discussion
    • Off-Topic
    • Scripts & Programming
    • Web Design
    • Self Promotion


There are no results to display.




Website URL











Found 1 result

  1. I have a few sites from China that must have their DNS pointing to my site’s IP address. If you enter their domain into the address bar of a browser, you get my site but their domain in the address bar. I’m not sure what their purpose of doing this is, but they have three of the top four search results when I search for my site on Google. Frustrating. Using the .htaccess file I’ve put in a rewrite condition and rule so if the incoming domain is NOT mine it will basically refresh to my domain. RewriteCond %{HTTP_HOST} !^(www\.)?myDomainName\.com$ [NC] RewriteRule (.*) http://www.$1 [R=301,L] But I don’t want to do this. I’d rather have anyone coming from those Chinese sites get a 404 Not Found message. I don’t really want to use a custom 404 page because – if I have this correct – they will still get to my site for the custom 404 page to be shown. I don’t want them on my site at all – I just want them to get the browser’s 404 message like the site does not exist. So, my question is what is the syntax for the RewriteRule to do this? Something like RewriteRule (.*) 404/$1 [R=301,L] ? I’ve searched Google, but haven’t come up with anything definite, so I really could use some help. Thank you for your help.