클라이언트 사이트에서 작동하도록 mod_rewrite를 얻을 수 없으며 .htaccess 파일을 완전히 무시합니다.
내가 사용하고 있는 Linux 버전이 무엇인지 100% 확신할 수는 없습니다. CentOs인 것 같습니다.
파일을 확인했는데 httpd.conf
mod_rewrite가 활성화되었습니다. httpd-vhosts.conf
파일을 로 변경 했습니다 AllowOverrides All
.
다음은 파일의 관련 내용입니다 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
내용은 이렇습니다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>
내 .htaccess
파일에는 다음 내용만 포함되어 있습니다.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^.*$ htaccess_tester.php
</IfModule>
Apache에 대한 오류 로그를 찾을 수 없습니다. 어딘가에 빠진 게 틀림없어...!