TCH-Thomas Posted May 10, 2004 Posted May 10, 2004 Been thinking again Can i have separate 404, 401 pages for different subdomains? If so what do i need to do in .htaccess? So far i have done it this way ErrorDocument 404 Http://www.jikrantz.se/error404.html Quote
TCH-Bruce Posted May 10, 2004 Posted May 10, 2004 I believe if you take the ErrorDocument 404 out of the .htaccess file and name the error document with a .shtml extension you can put the document in the particular folder you want the error to display for. So if you have a 404.shtml in your public_html folder and then want a different one in you sub domain or other folder just create a different 404.shtml file and place it there. Quote
LisaJill Posted May 10, 2004 Posted May 10, 2004 Alternatively, you can puta different .htaccess into the subdomains folder. That should override the preceding folders .htaccess. So if I wanted to do this, I could have for my main site a .htaccess in public_html that called certain error documents, then a .htaccess in say public_html/lisa (lisa.lisa-jill.com) that would call other error documents. That way you would not be required to stick with the .shtml ending, either. Quote
TCH-Thomas Posted May 10, 2004 Author Posted May 10, 2004 I thought of Lisas idea but wasnt sure. You see. you are talking to someone who almost killed the whole site a few days ago cause of some misplaced php. Thanks Bruce and Lisa. Quote
LisaJill Posted May 10, 2004 Posted May 10, 2004 I have broken my site umpteenth million times with .htaccess; I have about 50 copies spread around my hdd to recover from, though. Redundancy, baby... Quote
TCH-Bruce Posted May 10, 2004 Posted May 10, 2004 (edited) That's why I don't recommend using the .htaccess file and use the .shtml extension. Edited May 10, 2004 by TCH-Bruce Quote
LisaJill Posted May 10, 2004 Posted May 10, 2004 *nods* fair 'nuff, but all my pages are php so that's the solution I'd choose. .*grins* Quote
DarqFlare Posted May 11, 2004 Posted May 11, 2004 I've got both PHP and SHTML pages, just in case. There have been a few times that it didn't access the PHP and used the SHTML. I just have a META redirect in the SHTML pages that go to the PHP ones. Haha... 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.