SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard jumpthru's Avatar
    Join Date
    Apr 2000
    Location
    Los Angeles, California
    Posts
    1,008
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    .htaccess question

    First off:
    On my host, if you set up a subdomain, it works just like this...

    whatever.jumpthru.com/test.php
    is the same as
    www.jumpthru.com/whatever/test.php

    Now:
    My .htaccess looks like this:

    ErrorDocument 400 /error.php
    ErrorDocument 401 /error.php
    ErrorDocument 403 /error.php
    ErrorDocument 404 /error.php
    ErrorDocument 500 /error.php

    It works perfect, but it only works for
    www.jumpthru.com/doesnt_exist.php
    or
    www.jumpthru.com/whatever/doesnt_exist.php

    It doesn't work for
    whatever.jumpthru.com/doesnt_exist.php


    How can I make it work for both? Thanks.

  2. #2
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm wonderin' about this kind of thing too. i don't quite understand how the subdomains work where they're in subfolders of the main site.

    i'm just taking a guess here, but is your .htaccess file in the subdomain's folder (i.e. whatever in your example)? cuz if it's not i don't think it would work when you go to the subdomain.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  3. #3
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ya, when you're using the subdomain the root of the file structure is in that directory, so you need to have an .htaccess file there.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  4. #4
    SitePoint Wizard jumpthru's Avatar
    Join Date
    Apr 2000
    Location
    Los Angeles, California
    Posts
    1,008
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by aspen
    ya, when you're using the subdomain the root of the file structure is in that directory, so you need to have an .htaccess file there.
    yea, thats what i figured. thanks.

  5. #5
    SitePoint Wizard jumpthru's Avatar
    Join Date
    Apr 2000
    Location
    Los Angeles, California
    Posts
    1,008
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now I remember figuring that out, exactly. The subdomain makes it think its folder is root. So you need a .htaccess in that folder. Plus, its a pain because you have to also have your error pages in that folder, because if I remember, you cant access below root, even if its a virtual root.

    PS, someone just visted www.jumpthru.com/whatever/test.php and got a error page with broken images. I am sorry, i was working on the site a second ago. So go again and see my beautiful error page!

    PSS, its a shame i still haven't been able to figure out a way to delete a directory, but keep those images while you wait for the new ones to upload. cause' with my luck someone visits at the exact moment the images are deleted, and the new ones aren't up yet. darn.
    Last edited by jumpthru; Aug 2, 2001 at 00:42.

  6. #6
    SitePoint Wizard jumpthru's Avatar
    Join Date
    Apr 2000
    Location
    Los Angeles, California
    Posts
    1,008
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AHH!!!!

    I feel really stupid, cause I said that I fixed the broken images in my last post, and I just realised they are still broken.

    So now goto www.jumpthru.com/whatever/test.php

    And view my beautiful error page...this time working right.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •