php - Getting NotFoundHttpException when accessing a image file in uploads directory in Laravel 5.1 -


my setup

  • wamp
  • windows 8

i have uploads directory in

  • iapp <- root directory
    • uploads
    • app
    • public

virtual hosts file (httpd-vhosts.conf)

namevirtualhost *:80      <virtualhost *:80>         documentroot c:/wamp/www/         servername localhost     </virtualhost>      <virtualhost *:80>          serveradmin admin@iapp.dev         documentroot "c:/wamp/www/iapp/public"          servername iapp.dev         errorlog "logs/iapp.dev-error.log"         customlog "logs/dev-iapp.dev-access.log" common          <directory "/">             order deny,allow             deny             allow 127.0.0.1         </directory>      </virtualhost> 

my htaccess file inside public diretory

<ifmodule mod_rewrite.c>     <ifmodule mod_negotiation.c>         options -multiviews     </ifmodule>      rewriteengine on      # redirect trailing slashes...     # rewriterule ^(.*)/$ /$1 [l,r=301]      #rewritecond %{request_uri} !^     #rewriterule ^(.*)$ /$1 [l]      # handle front controller...     rewritecond %{request_filename} !-d     rewritecond %{request_filename} !-f     rewriterule ^ index.php [l] </ifmodule> 

my app working fine can't access images/files inside uploads directory.when accessing image or file throwing me error

notfoundhttpexception in c:\wamp\www\iapp\vendor\laravel\framework\src\illuminate\routing\routecollection.php line 142: 

how solve this? , want know best place put file uploads?

thank you!

you cannot access directories , files above document root, public. need move uploads directory public directory.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -