Home >Backend Development >PHP Tutorial >How Can I Remove \'public/index.php\' from My Laravel URLs?
Q: How can I remove the "public/index.php" segment from Laravel-generated URLs?
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/ [L] </IfModule>
paths.php:
'app' => __DIR__.'/../app', 'public' => __DIR__.'/../../',
index.php:
require __DIR__.'/laravel_code/bootstrap/autoload.php'; $app = require_once __DIR__.'/laravel_code/bootstrap/start.php';
The above is the detailed content of How Can I Remove \'public/index.php\' from My Laravel URLs?. For more information, please follow other related articles on the PHP Chinese website!