The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Subdomain Not Found Redirect

Discussion in 'General Discussion' started by matsko, Apr 29, 2005.

  1. matsko

    matsko Member

    Joined:
    Apr 29, 2005
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    hello I am currently runnign a Cpanel Control Panel under a WHM and I need to have a system for subdomains that works like so...

    lets say I have 3 subdomains

    http://nice.site.com
    http://good.site.com
    http://perfect.site.com

    and they work fine, but what happens when you enter a subdomain that is not one of those three for example...

    http://bad.site.com

    then it would give you an error page. I would like instead having it display an error page to simply redirect to my own page... Also to have it take the url entered "http://bad.site.com" and attach it like so...

    lets say my error handling page is error.php

    http://www.site.com/error.php?url=http://bad.site.com

    now you see how it goes to the error page (since the subdomain doesn't exist) and then attaches the url into a querystring for the error page to use...

    how would you do this.

    If anything then how would you have it simply redirect to an error page?

    thanks
     
Loading...

Share This Page