Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 872 Bytes

File metadata and controls

17 lines (13 loc) · 872 Bytes

Remove "public" on Symfony or Laravel URL

EN : When you create your website or web application with the Symfony or Laravel framework and deploy it on shared hosting, the access address becomes http(s)://example.com/public.
To remove the public from URLs you can add these instructions to the .htaccess file at the root of the site.`

FR : Lorsque vous créez votre site ou application web avec le framework Symfony ou Laravel et le déployez sur un hébergement mutualisé, l'adresse d'accès devient http(s)://example.com/public.
Pour enlever le public sur les URLs vous pouvez ajouter ces instructions sur le fichier .htaccess à la racine du site.

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L,QSA]


You can buy me a coffee here.