kaseytraeger Posted July 13, 2004 Posted July 13, 2004 I'm trying to use .htaccess to redirect users to a custom error page inside my MT installation (so I can use my blog templates). I've set it up in .htaccess as >Redirect /home/cpanelname/public_html/doggydiaries/404.shtml http://www.pudgypuppy.com/doggydiaries/404.php where doggydiaries is set up as a subdomain. I then installed a custom error page at http://www.pudgypuppy.com/doggydiaries/404.php. When I tested it out, however, by using the page http://www.doggydiaries.pudgypuppy.com/hello.php, I was not redirected. Instead, I received the standard, non-friendly error message as shown in the attached image. Any idea how to fix this so I can successfully redirect users to an error page that makes us of my MovableType templates? Thanks. Quote
TCH-Rob Posted July 13, 2004 Posted July 13, 2004 Instead of a redirect try just this; >ErrorDocument 404 /404.php Quote
kaseytraeger Posted July 13, 2004 Author Posted July 13, 2004 Rob, If I code my .htaccess file that way, will that redirect error pages only for the subdomain "doggydiaries.pudgypuppy.com"? I don't have a custom error page set up under the TLD yet, so I'm not sure how it would redirect if someone were to try to reach the page doggydiaries.pudgypuppy.com/nosuchpageexists.htm versus trying to reach the page pudgypuppy.com/nosuchpageexists.htm. Quote
kaseytraeger Posted July 13, 2004 Author Posted July 13, 2004 You can disregard my previous post. I got it all figured out. I put a new .htaccess file in my subdomain directory. The only line in that file is >ErrorDocument 404 http://www.doggydiaries.pudgypuppy.com/404.php The .htaccess in the TLD (pudgypuppy.com) has not been altered. Once I create a custom error page for pudgypuppy.com, I should be able to access it using this line in the .htaccess file for pudgypuppy.com: >ErrorDocument 404 http://www.pudgypuppy.com/404.php Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.