HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Redirecting unexisting subdomains to error page (http://www.howtoforge.com/forums/showthread.php?t=58987)

alleks 6th October 2012 02:16

Redirecting unexisting subdomains to error page
 
I'm really having an issue with unexisting subdomains. For example, I have created the example.com domain with www. as auto-subdomain, but the problem is that if I go to 1029ur0pa.example.com it'll still open, just as www.example.com

So, how can I fix that? Any body had this issue before?

till 6th October 2012 11:55

The recommended way is to fix the dns record, remove the wildcard record and replace it eith records for subdomains that exist. Wildcard records are bad for search engine ranks anyway.

Then ensure tht you did not select * as auto subdomain in the site settings for the same reason.

If you dont want to alter the dns in the first strp, then create a catchall vhost.

alleks 8th October 2012 17:30

Oh, I see! I just learned something new, and that you for that Till!

I decided to go for the DNS solution, but I will investigate the vhost catchall solution later.

Thank again

cfoe 9th October 2012 17:46

If you use the "*." auto-subdomain on the site you can set a htaccess file with a rewrite for all requests other than www.example.com and example.com to reply with a 404.


All times are GMT +2. The time now is 09:16.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.