I
I
Ivan Vorobei2016-05-26 18:37:34
Apache HTTP Server
Ivan Vorobei, 2016-05-26 18:37:34

Remove public/index.php from Lumen?

I want to place several Lumen projects in one folder.
For example, I
domen.com
create a domain subdomain And I put Lumen projects in the sub
sub.domen.com
hosting folder . Now I put .htaccess in each project

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteRule ^(.*)$ [folder-name]/public/$1 [L]
</IfModule>

where folder-name is the folder name of a specific Lumen project.
On request
sub.domain.com/[folder-name]/
The project starts, but gives an error:
c00ea942652848bd8b164f68bccf19ee.png
On request
sub.domain.com/[folder-name]/index.php
, routing works as expected.
How to make a request without public/index.php in Lumen ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2016-05-27
@ExileeD

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ [folder-name]/public/index.php/$1 [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question