remove Laravel 4.2 /public from url
Normally you need the htaccess file to point to the public folder. But you can copy the content of the public folder in your root folder and change the app path to it.
Copy your index file in your root folder and add this to your index.php file:
// set the public path to this directory
$app->bind('path.public', function() {
return __DIR__;
});
Laravel 8.4 – Remove Public from URL
To remove the /public from the URL you are not going to use the .htaccess file.
What you are going to do instead is set the /public folder as the serving directory for your Server.
If you use Apache, just go to your /etc/apache2/sites-available/000-default.conf file and change the DocumentRoot from {your base folder}/ (usually /var/www) to {your base folder}/public
How to remove public from laravel url
If you have done 2 steps already have you change the index.php having vendor folder path inside remove the /../ and everything work fine
$app = require_once __DIR__/../'/bootstrap/app.php';
to
$app = require_once __DIR__.'/bootstrap/app.php';
How to remove public from URL in laravel 4.2
I already copied the .htaccess file from /public directory to my Laravel root folder.Also I renamed the server.php in the my Laravel root folder to index.php and its worked for me.
Remove /Public from url in Laravel
.htaccess files wont work on this, what i did is i update the root directory in my server side.
instead the root will be at public_html I change it to public_html/public
Related Topics
How to Select All Column Name from a Table in Laravel
How to Set an Arrays Internal Pointer to a Specific Position? PHP/Xml
What Are the Valid Characters in PHP Variable, Method, Class, etc Names
Is Multiple Inheritance Allowed at Class Level in PHP
Jquery $.Ajax Request of Datatype JSON Will Not Retrieve Data from PHP Script
Strcmp Equivelant for Integers (Intcmp) in PHP
"Adaptive Server Is Unavailable or Does Not Exist" Error Connecting to SQL Server from PHP
Non-Breaking Utf-8 0Xc2A0 Space and Preg_Replace Strange Behaviour
Unit Test Laravel's Formrequest
Codeigniter Session Data Lost After Redirect
How Is Testing the Registry Pattern or Singleton Hard in PHP
Php: Why Isn't Exec() Returning Output
Special Characters in Fpdf with PHP
What Causes an Http 405 "Invalid Method (Http Verb)" Error When Posting a Form to PHP on Iis