- Impact
- 138
I want to set-up a redirect for all traffic to a domain name that does not resolve to a file to go to the main page, http://www.domain.com.
For example, I want all of these to redirect to http://www.domain.com:
http://www.domain.com/unknownfile.htm
http://blahblah.domain.com
http://blahblah.domain.com/unknownfile.htm
http://domain.com
http://domain.com/unknownfile.htm
What is the exact code to implement this? I have Apache (Unix) server for hosting and use CPanel control panel. I think this is either writing something on .htaccess or something else? I have a domain name that gets about 600 visitors/day to random subdomains and files that don't exist, and want them to all redirect to the main page. Thanks!
For example, I want all of these to redirect to http://www.domain.com:
http://www.domain.com/unknownfile.htm
http://blahblah.domain.com
http://blahblah.domain.com/unknownfile.htm
http://domain.com
http://domain.com/unknownfile.htm
What is the exact code to implement this? I have Apache (Unix) server for hosting and use CPanel control panel. I think this is either writing something on .htaccess or something else? I have a domain name that gets about 600 visitors/day to random subdomains and files that don't exist, and want them to all redirect to the main page. Thanks!





