Apache rewrite for Laravel /public
apache, laravel, mod-rewrite, php
Solution
I solved it partly. If I have a .htaccess in the root instead of `/public` with
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /public/index.php/$1 [L]
I can open `http://kemtime2_neu.pr.domain.de/login` but the images and css is still wrong. I need to check first if the files exist in `/public`. I think this is a new question.
Problem
I am sorry about this, but my htdocs root is wrong and I can't change that. So I have to make it work in the `/public` folder. I use the normal Laravel .htaccess file with the following rewrite: ``` RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] ``` If I open `http://kemtime2_neu.pr.domain.de/public` I get redirected to `http://kemtime2_neu.pr.domain.de/public/http://kemtime2_neu.pr.domain.de/public/login` How can I fix this? I would love to make it work from `http://kemtime2_neu.pr.domain.de/` but getting it to work with `http://kemtime2_neu.pr.domain.de/public/` would be fine.