apache - Subpages aren't working in Kirby even with htaccess file -
i'm trying setup kirby locally using mamp. mamp setup have can point run multiple sites virtual hosts. use code:
namevirtualhost * <virtualhost *> documentroot "/applications/mamp/htdocs" servername localhost </virtualhost> <virtualhost *> documentroot "/users/oscargodson/dropbox/projects/icarus" servername dev.icarus </virtualhost>
when go dev.icarus initial page loads totally fine. css, images, everything. once try go subpage, including panel, 404. know sure htaccess file in folder. tried using git install , manual zip install. made sure in in httpd.conf
file have rewrite turned on
loadmodule rewrite_module modules/mod_rewrite.so
i'm not sure else up. googling kept returning results htaccess file being missing.
edit
here's htaccess file per request. default 1 works if keep project inside of htdocs directory in mamp. tried uncommenting rewritebase , making /
(a total guess) didn't @ all.
# kirby .htaccess # rewrite rules <ifmodule mod_rewrite.c> # enable awesome urls. i.e.: # http://yourdomain.com/about-us/team rewriteengine on # make sure set rewritebase correctly # if running site in subfolder. # otherwise links or entire site break. # # if homepage http://yourdomain.com/mysite # set rewritebase to: # # rewritebase / # block text files in content folder being accessed directly rewriterule ^content/(.*)\.(txt|md|mdown)$ index.php [l] # block files in site folder being accessed directly rewriterule ^site/(.*) index.php [l] # block files in kirby folder 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 want use. # # adddefaultcharset utf-8 # # php_flag short_open_tag on
mike rockett in comments pointed me in right direction. in httpd.conf
file had change
<directory /> options indexes followsymlinks allowoverride none </directory>
to
<directory /> options indexes followsymlinks allowoverride </directory>
then restarted mamp , worked!
Comments
Post a Comment