http://example.com/index.php?path=controller/functionへの URLをマスクしたいhttp://example.com/controller/function。function存在する必要はありません。
htaccessファイルでこれを行うにはどうすればよいですか?
以下は動作しません。
RewriteRule ^/?assets/(.*)$ assets/$1 [L] # directory for CSS, images, and JavaScript
RewriteRule ^$ /index [redirect]
RewriteRule ^([a-zA-Z]+)/?([a-zA-Z/]*)$ index.php?path=$1/$2 [L]
現在、http://example.com/controller/functionブラウザで入力すると 404 エラーが発生しますが、入力http://example.com/index.php?path=controller/functionは機能します。
ありがとう!