Results 1 to 6 of 6

Thread: .htaccess problems

  1. #1
    Join Date
    Dec 2010
    Beans
    2

    .htaccess problems

    Hi there - we're running Apache/2.2.11 (Ubuntu) and trying to set up custom error messages using an .htaccess file that looks like this

    -----
    <Files .htaccess>

    order allow,deny

    deny from all

    </Files>

    ErrorDocument 404 /errordocs/404.html
    -----

    When I save this to var/www/ it has no effect (tested on another server but using a shared hosting package it works fine).

    Any ideas for the nube? Thanks in advance.

    Cheesus

  2. #2
    Join Date
    May 2010
    Location
    Thessaloniki
    Beans
    216
    Distro
    Ubuntu

    Re: .htaccess problems

    I suppose there actually exists a directory /errordocs along with the necessary files?

  3. #3
    Join Date
    Jul 2010
    Location
    London
    Beans
    712
    Distro
    Ubuntu Gnome 17.04 Zesty Zapus

    Re: .htaccess problems

    You need to enable your .htaccess files. Find your Virtualhost container - the default is /etc/apache2/sites-enabled/000-default - and in the /var/www Directory container, change

    Code:
    AllowOverride None
    ...to

    Code:
    AllowOverride All
    ...then restart Apache

    Code:
    sudo service apache2 graceful
    ... and you should now see your error page.

    *Edit* to update your 000-default file you'll need to do ALT-F2 -> gksudo gedit /etc/apache2/sites-enabled/000-default

    If it works, please go to the top of this page and under Thread Tools, mark as SOLVED
    Last edited by jim_deadlock; December 10th, 2010 at 03:24 PM.

  4. #4

    Lightbulb Re: .htaccess problems

    Windows assumes the user is an idiot.
    Linux demands proof.

  5. #5
    Join Date
    Dec 2010
    Beans
    2

    Re: .htaccess problems

    Thanks a million guys - we're going to try those options and see how we get on.

    Ch44

  6. #6
    Join Date
    Mar 2013
    Beans
    12

    Re: .htaccess problems

    Thanks Jim! This really helped! I don't know why these websites that provide instructions how do to this stuff NEVER TELL YOU EVERYTHING you need to know. The documentation wasn't clear either!

    Thanks! You to Habitual! Your links have good information!
    Last edited by Maurices5000; March 19th, 2013 at 03:19 AM.

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
  •