お世話になります。
AWS上にApacheを入れて、
CakePHP3系を動かしています。
/etc/httpd/conf/httpd.conf で
PHP
1<Directory "/var/www/html"> 2 AllowOverride All 3</Directory>
としており、htaccessが動作していることも確認済みです。
ただ、app/webroot/.htaccessで以下のように書いているのですが、wwwなしに統一できずに困っております。
plain
1<IfModule mod_rewrite.c> 2 RewriteEngine On 3 RewriteCond %{HTTP_HOST} ^www\.example\.com 4 RewriteRule (.*) http://example.com/$1 [R=301,L] 5 RewriteCond %{REQUEST_FILENAME} !-d 6 RewriteCond %{REQUEST_FILENAME} !-f 7 RewriteRule ^ index.php [L] 8</IfModule>
なにかおかしな部分が無いか見ていただけますでしょうか。
よろしくお願い致します。
回答1件
あなたの回答
tips
プレビュー