htaccess public laravel

There are two solutions:

1. Using .htaccess with mod_rewrite

 
DirectoryIndex index.php

RewriteEngine On 
RewriteRule ^$ public/index.php [L]
RewriteRule ^((?!public/).*)$ public/$1 [L,NC]

2. You can add a index.php file containing the following code and put it under your root Laravel folder (public_html folder).

<?php
header('Location: public/');
  • htaccess public laravel, htaccess, public, laravel, cpanel
  • 0 Пользователи считают это полезным
Помог ли вам данный ответ?

Связанные статьи

Подключение по ftp

Для работы с ftp в cpanel можно использовать те же доступы что и для cpanel (тот же логин и...

Prevent DDOS to xmlrpc.php (wordpress) with ModSecurity

Lots of attacks are made towards WordPress XML-RPC (xmlrpc.php), which can cause a slowdown in...

DDoS защита в Litespeed

Пример конструкции `.htaccess` с **LsRecaptcha** и `max_conn` LiteSpeed позволяет использовать...