Jump to content

If subdomain doesn't exist...


Guest Axel Wers

Recommended Posts

In my error log is lot of such logs:

[Tue Feb 05 21:07:54 2008] [error] [client xx.xxx.xxx.xxx] File does not exist: /path/mydomain.com/root/subdomain_which_doesn't exist

When a visitor types to address bar this: www.mydomain.com/subdomain_which_doesn't_exist he will get 404 error

Is there way how can I redirect all unknow addresses to main page via .htaccess?

www.mydomain.com/subdomain_which_doesn't exist --->>redirect to--->> www.mydomain.com

:)

Link to comment
Share on other sites

www.mydomain.com/subdomain_which_doesn't exist --->>redirect to--->> www.mydomain.com



:)



You can add something like:

Redirect permanent /subdomain_which_doesn't/	http://wwww.mydomain.com

or

ErrorDocument 404 http://wwww.mydomain.com


this will redirect any "404 pages" (pages not found) to your main domain URL

HTH

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...