Option 1: Use .htaccess
If it isn’t already there, create an .htaccess file in the Laravel root directory. Create a .htaccess
file your Laravel root directory if it does not exists already. (Normally it is under your public_html
folder)
Edit the .htaccess file so that it contains the following code:
<IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*)$ public/$1 [L] </IfModule>
Now you should be able to access the website without the “/public/index.php/” part.
Option 2 : Move things in the ‘/public’ directory to the root directory
Make a new folder in your root directory and move all the files and folder except public folder. You can call it anything you want. I’ll use “laravel_code”.
Next, move everything out of the public directory and into the root folder. It should result in something somewhat similar to this:
After that, all we have to do is edit the locations in the laravel_code/bootstrap/paths.php
file and the index.php
file.
In laravel_code/bootstrap/paths.php
find the following line of code:
'app' => __DIR__.'/../app', 'public' => __DIR__.'/../public',
And change them to:
'app' => __DIR__.'/../app', 'public' => __DIR__.'/../../',
In index.php
, find these lines:
require __DIR__.'/../bootstrap/autoload.php'; $app = require_once __DIR__.'/../bootstrap/start.php';
And change them to:
require __DIR__.'/laravel_code/bootstrap/autoload.php'; $app = require_once __DIR__.'/laravel_code/bootstrap/start.php';
Ref: How to remove “public/index.php” from URL generated in Laravel
play youtube
play youtube
xvideos
xporn
Phim sex
What Vaccines Do Dogs Need Annually
Wordle Jan 19
What Is Threshold Amount
My Pet Frame
Box Score For World Series
Louisville Women S Basketball Roster
Apple Savings Account Cons
Cso Criminal Search Bc
What Were Kleenex Tissues Originally Used For
Mens All Birds
Is Better Call Saul Over
Waitrose Warwick Way
Usd To Rm
How Much Is A Fitbit
Civil Liabilities Definition
What Is A Fast Internet Download Speedhulk Smash Birthday Cake
Waitrose Warwick Way
Rabies Vector Species
Gonzo Move
What Is The Sherman Act
Pingback: 我怎么能消除&ldquo;公共/指标。PHP &rdquo;的URL生成laravel? – CodingBlog
Pingback: How to change upload limit of WordPress hosted on Azure VM - Code Snippets
Pretty nice post. I just stumbled upon your weblog
and wished to mention that I have really loved surfing around
your weblog posts. After all I’ll be subscribing on your feed and I am hoping
you write once more soon!
Wonderful, what a web site it is! This webpage gives useful information to us, keep it up.