SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)

    Assign a page to 404

    How do I assign a webpage so that it shows up when there's a 404 or similar error?

    Thanks.
    ~TehYoyo

  2. #2
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,422
    Mentioned
    273 Post(s)
    Tagged
    5 Thread(s)
    Add the following to your .htaccess file:
    Code:
    ErrorDocument 404 /path_to/404.html
    (assuming the custom error page is called 404.html)

    Unless you're on Window's hosting, in which case I haven't a clue.

  3. #3
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    What exactly is .htaccess and where is it kept?

    I've heard it mentioned and I know that it can be used to password protect...is it Linux only?

    ~TehYoyo

  4. #4
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,422
    Mentioned
    273 Post(s)
    Tagged
    5 Thread(s)
    I believe it's specific to Apache, which runs on Linux, but I wouldn't like to swear to that.

    There's a handy basic guide here.

  5. #5
    SitePoint Wizard
    Join Date
    Dec 2003
    Location
    USA
    Posts
    2,582
    Mentioned
    29 Post(s)
    Tagged
    0 Thread(s)
    Yes, .htaccess files are specific to Apache.

    If you are running a different web server (like Linux or IIS) there are similar, but slightly different ways to do so, so we'd need to know which web server you are using.

  6. #6
    <title class="lol"> bronze trophy TehYoyo's Avatar
    Join Date
    Feb 2012
    Location
    Northeast Chicago Suburbs
    Posts
    806
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    I was just wondering...for future use.

    Thanks, all.

    ~TehYoyo

  7. #7
    SitePoint Wizard silver trophy ldcdc's Avatar
    Join Date
    May 2004
    Location
    Ploiesti
    Posts
    4,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Apache runs on Linux as well as Windows (and some other OSes). It's just rare to find a Windows based host use it.

    .htaccess is Apache specific, though IIS has similar capabilities these days from what I've read (different code though). There's also the Litespeed web server, which aims to be a drop in replacement of Apache (with a lot better performance, or so they claim), and it advertises itself to be .htaccess compatible.

    .htaccess is a file you can create and place in the folder you want it to regulate.

    http://en.wikipedia.org/wiki/.htaccess
    http://en.wikipedia.org/wiki/.htpasswd
    http://en.wikipedia.org/wiki/Apache_HTTP_Server
    HostPeek.com - budget hosts, compared
    CouponsNexus.com - web hosting coupons

    Ultra Cheap Hosts | Web Hosting Reviews Forums


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
  •