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:

  1. already considered using virtual host (i dont want to, several reasons)
  2. made sure mod_rewrite on (yes, is!)
  3. written .htaccess file contains default silex webserver configuration. posted [here](http://silex.sensiolabs.org/doc/web_servers.html) , contained inside silex/ directory. code below
  4. successfully reached silex/web/index.php page via localhost/~username/silex (so mod_rewrite working). code below well
  5. i echo out "here!" statement , on silex/web/index.php
  6. 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:

sorry, page looking not found

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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -