次の.htaccessファイルがあります。
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^mydomain.com
RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^mykeyword$ news.php [L,QSA,NC]
ただし、news.phpを開いても、URLは同じです。つまり、www.mydomain.com/mykeywordではなくwww.mydomain.com/news.phpです。
私は次のテストを行います:
RewriteEngine on
RewriteRule ^test\.html$ test.php [L]
サーバーにtest.htmlとtest.phpの2つのファイルをアップロードし、www.mydomain.com / test.htmlと入力すると、phpページが表示されたので、設定に問題はありません。一体何が間違っているのか?
どんな助けでも深く感謝されます。
よろしく、ゾラン