Apache rewrite for Laravel /public

后端 未结 2 1431
臣服心动
臣服心动 2020-12-11 09:48

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 .

2条回答
  •  轮回少年
    2020-12-11 10:25

    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.

提交回复
热议问题