Jump to content
xisto Community
moldboy

Diffrent Error Pages for diffrent subdomains

Recommended Posts

Okay, I'm not sure this is the right place for this message, but I was wondering if I can have diffrent error messages for diffrent subdomains, so mysite.trap17.com/a_file_that_isnt_real, would yield one error page, where as secondpage.mysite.trap17.com/a_file_that_isn't_real would yeild a diffrent 404 page?

Share this post


Link to post
Share on other sites

I think that's possible, but the cPanel tool won't work.

Make a file called .htaccess in a text editor (such as Notepad or Dreamweaver), and insert this code:

ErrorDocument 404 /maybeafolderhere/theerrorfile.ext
And I think you can have different .htaccess files for different subdomains, but I'm not sure. :)

Oh by the way, I forgot something. You can changed "404" in the code to another error, for instance "500" (Internal Server Error).

Share this post


Link to post
Share on other sites

Yes, I am 99.99% sure that it is possible. To create the error page for the ordinary domain, edit:

 

/home/user/public_html/.htaccess

 

And for the subdomain:

 

/home/user/public_html/subdomain_name/.htaccess

 

Using the code Amezis provided.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.