mod_rewrite / htaccess não funciona

1

Não consigo que o mod_rewrite funcione no site de um cliente, apenas ignora completamente o arquivo .htaccess.

Eu não tenho 100% de certeza de qual sabor do Linux está sendo usado, parece ser o CentOs.

Eu verifiquei o arquivo httpd.conf e mod_rewrite está ativado. Eu alterei o arquivo httpd-vhosts.conf para AllowOverrides All .

Este é o conteúdo relevante do arquivo data/lampp/etc/httpd.conf :

LoadModule rewrite_module modules/mod_rewrite.so

<Directory />
Options FollowSymLinks
AllowOverride None
#XAMPP
#Order deny,allow
#Deny from all
</Directory>

<Directory "/opt/lampp/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
#Options Indexes FollowSymLinks
# XAMPP
Options Indexes FollowSymLinks ExecCGI Includes


#
# 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
# since XAMPP 1.4:
AllowOverride All

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all

</Directory>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>

#
# "/opt/lampp/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/opt/lampp/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

# Virtual hosts
Include etc/extra/httpd-vhosts.conf

# XAMPP
Include etc/extra/httpd-xampp.conf

E aqui está o conteúdo de data/lampp/etc/extra/httpd-vhosts.conf

NameVirtualHost *:80

<Directory "/opt/lampp/htdocs/mydomain">
AllowOverride All
Order allow,deny
allow from all
</Directory>

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /opt/lampp/htdocs
ServerName xxx.xxx.xxx.xxx
</VirtualHost>

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /opt/lampp/htdocs/mydomain
RewriteEngine On
</VirtualHost>

Meu arquivo .htaccess contém exatamente isto:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^.*$ htaccess_tester.php
</IfModule>

Não consigo encontrar nenhum log de erro para o apache. Eu devo estar faltando alguma coisa em algum lugar ...!

    
por Denial Design 09.04.2016 / 07:27

0 respostas