MAMPを使用してKirbyをローカルでセットアップしようとしています。私のMAMPセットアップはそれを持っているので、複数のサイトを仮想ホストとして実行することができます。私はこのコードを使用します:
NameVirtualHost *
<VirtualHost *>
DocumentRoot "/Applications/MAMP/htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot "/Users/oscargodson/Dropbox/projects/icarus"
ServerName dev.icarus
</VirtualHost>
dev.icarus にアクセスすると、最初のページは問題なく読み込まれます。すべての CSS、画像、すべて。パネルを含むサブページに移動しようとすると、404 が表示されます。htaccess ファイルがフォルダーにあることは確かです。git install と手動の zip install を使用してみました。httpd.conf
また、ファイルで書き換えがオンになっていることを確認しました
LoadModule rewrite_module modules/mod_rewrite.so
他に何を調べるかわかりません。グーグルは、htaccessファイルが見つからないという結果を返し続けました。
編集
リクエストごとの htaccess ファイルは次のとおりです。プロジェクトを MAMP の htdocs ディレクトリ内に保持している場合に機能するのは、デフォルトのものです。私は RewriteBase のコメントを外して、それを/
(完全な推測で)作ってみましたが、それはまったく役に立ちませんでした。
# Kirby .htaccess
# rewrite rules
<IfModule mod_rewrite.c>
# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on
# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
# RewriteBase /
# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
# block all files in the site folder from being accessed directly
RewriteRule ^site/(.*) index.php [L]
# block all files in the kirby folder from being accessed directly
RewriteRule ^kirby/(.*) index.php [L]
# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]
# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on