apache - Silex in subdirectory on localhost : "Sorry, the page you are looking for could not be found" -
i know there several similar questions asked on topic. i've looked @ of them , none of them have solved issues. here's have done far:
- already considered using virtual host (i dont want to, several reasons)
- made sure mod_rewrite on (yes, is!)
- written .htaccess file contains default silex webserver configuration. posted [here](http://silex.sensiolabs.org/doc/web_servers.html) , contained inside silex/ directory. code below
- successfully reached silex/web/index.php page via localhost/~username/silex (so mod_rewrite working). code below well
- i echo out "here!" statement , on silex/web/index.php
- i tried 1 solution consisted of placing second .htaccess file in silex/web/ dir
.htaccess file:
options -multiviews rewriteengine on ## uncommented because silex in subdir rewritebase /~username/silex/web rewritecond %{request_filename} !-f rewriterule ^ index.php [qsa,l]
/silex/web/index.php file:
require_once __dir__.'/../vendor/autoload.php'; $app = new silex\application(); echo "hello"; $app->get('/', function() { return 'hello!'; }); $app->run();
when silex/web/index.php here's get:
i've been working on 2 days , starting lose it. appreciated. thanks.
ah ha! found answer here -> mamp silex htaccess.
i'm hoping solution other people going though pain! :)
Comments
Post a Comment