Support the ongoing development of Laravel.io →
posted 8 years ago
Configuration
Last updated 1 year ago.
0

yes move the folder that contains the app outside from public_html rename public folder to whatever you want and put it inside public html and then change those.

server.php:

 <?php
 /**
* Laravel - A PHP Framework For Web Artisans
*
* @package  Laravel
* @author   Taylor Otwell <[email protected]>
*/

$uri = urldecode(
   parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
 );

 // This file allows us to emulate Apache's "mod_rewrite" functionality from the
 // built-in PHP web server. This provides a convenient way to test a Laravel
 // application without having installed a "real" web server software here.
 if ($uri !== '/' && file_exists(__DIR__.'/yourFolderName'.$uri)) {
   return false;
 }  

 require_once __DIR__.'../public_html/yourFolderName/index.php';

on your public folder index.php:

require __DIR__.'../../../yourAppFolder/bootstrap/autoload.php';
$app = require_once __DIR__.'../../../yourAppFolder/bootstrap/app.php';

and your htaccess:

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]

htaccess might not be necessary i had a problem with jwt token and i changed it.

Last updated 8 years ago.
0

.htaccess:

RewriteEngine On
RewriteBase /

?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

jawb jawb Joined 16 Apr 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.