I create BlogTest laravel 5.6 project on local machine. I have installed wamp, and create alias like http://localhost/blogtest/. Also crete .htaccess file in root of project and in public folder. When I try to open any route even http://localhost/blogtest/ I get NotFoundHttpException error! But if I try http://localhost/blogtest/public/ then it works! What is problem here?
This is alias config files and .htaccess files.
blogtest.config:
Alias /blogtest "e:/test.web/Blog.Test/"
<Directory "e:/test.web/Blog.Test/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<ifDefine APACHE24>
Require local
</ifDefine>
<ifDefine !APACHE24>
Order Deny,Allow
Deny from all
Allow from localhost ::1 127.0.0.1
</ifDefine>
</Directory>
Root .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blogtest/
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Public folder .htaccess file:
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /blogtest/
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Did anyone have similar problem?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire