Results 1 to 3 of 3

Thread: How to do work .htaccess files in Apache2

  1. #1

    Default How to do work .htaccess files in Apache2

    Hello to everybody. I have a problem when I set a .htaccess file in my workspace (/srv/www/htdocs/blog/.htaccess). I thin the problem is that Apache2 not read .htaccess, because when I type this simply instruccion:

    Code:
    RewriteEngineOn
    
    RewriteRule ^index.php$ index.html [L]
    Apache2 don't redirect from index.php to index.html.

    I was tryed enable mod_rewrite with this command

    Code:
    sudo a2enmod rewrite
    and the result is: "rewrite" already present

    Also I was check it with phpinfo() function of PHP, and mod_rewrite it's was loaded.

    So I don't know what is the problem with .htaccess and Apache2.

    (Sorry for my bad English, my native language is Spanish from Spain)

    Thanks!

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,378

    Default Re: How to do work .htaccess files in Apache2

    Did you configure in your Apache configuration that OOverride by .htaccess should be honoured?
    Code:
            # AllowOverride controls what directives may be placed in .htaccess files.
            # It can be "All", "None", or any combination of the keywords:
            #   Options FileInfo AuthConfig Limit
    AllowOverride None
    Henk van Velden

  3. #3

    Default Re: How to do work .htaccess files in Apache2

    This way is correct?


Posting Permissions

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