Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.


Can we write some kind of regular expression or Rule in "hosts" file to redirect certain domains ending .local to certain ip address. like using above domains. *.local www.* local.*.*

// Hosts file path on Mac OS X is /private/etc/hosts and in windows c:/windows/system32/drivers/etc...

share|improve this question

migrated from stackoverflow.com Aug 15 '10 at 15:07

This question came from our site for professional and enthusiast programmers.

Mac, not MAC, please. –  Arjan Aug 15 '10 at 15:18

2 Answers 2

No, this is not possible.

See these related questions:

share|improve this answer

This is not possible in the hosts file. For acceptable syntax see this: /etc/hosts file

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.