2017-07-16 5 views
0

この.htaccessはURLを書き換えます。私はvar/logs/apache2/error_logをチェックすると無効なコマンド 'RewriteEngine'は、サーバー構成に含まれていないモジュールによってスペルが間違っているか、または定義されていない可能性があります。

、それは言う: -

[[Sun Jul 16 18:22:28.958099 2017] [core:alert] [pid 4237] [client ::1:54344] /Library/WebServer/Documents/getcv/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration 

間違っている可能性がありますか?私もrewrite_moduleは、ここでは、mod_rewriteのは、あなたのApache上で有効の.htaccess

Options +FollowSymLinks 
RewriteEngine On 
RewriteBase /foldername/ 

RewriteCond %{THE_REQUEST} /my_profile\.php\?username=([^\s&]+) [NC] 
RewriteRule^%1? [R=301,L,NE] 

RewriteCond %{SCRIPT_FILENAME} !-d 
RewriteCond %{SCRIPT_FILENAME} !-f 
RewriteRule ^([\w-]+)/?$ my_profile.php?username=$1 [L,QSA] 

答えて

-1

を持っていますかのhttpd.confに

LoadModule request_module libexec/apache2/mod_request.so 
LoadModule include_module libexec/apache2/mod_include.so 
LoadModule rewrite_module modules/mod_rewrite.so 
LoadModule filter_module libexec/apache2/mod_filter.so 

を有効にしていますか?

+1

あなたは私の質問を全部読んだことがありますか? – RinSupreme

+0

2番目の文に「httpd.confでrewrite_moduleを有効にしています」という質問があります。 – chrki

関連する問題

 関連する問題