Search
 
SCRIPT & CODE EXAMPLE
 

PHP

remove public in laravel hosting

#Create .htaccess In Laravel Project Root
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^ ^$1 [N]

    RewriteCond %{REQUEST_URI} (.w+$) [NC]
    RewriteRule ^(.*)$ public/$1 

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ server.php
</IfModule>
Comment

laravel remove public from url

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]

RewriteCond %{REQUEST_URI} (.w+$) [NC]
RewriteRule ^(.*)$ public/$1 

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ server.php
Comment

laravel remove public from url

// Larave remove /public/ from URL
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Comment

how to remove public from url in laravel

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

Remove public or index file from url in laravel

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -d [OR]
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule ^ ^$1 [N]

    RewriteCond %{REQUEST_URI} (.w+$) [NC]
    RewriteRule ^(.*)$ public/$1 

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ server.php

</IfModule>
Comment

Laravel 8 – Remove Public from URL

don't remove your server.php into index.php in root 
file you should place following inside .htacess file in root


RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]

RewriteCond %{REQUEST_URI} (.w+$) [NC]
RewriteRule ^(.*)$ public/$1

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ server.php

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php80” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php80 .php .php8 .phtml
</IfModule>
Comment

Laravel Remove Public from URL

<IfModule mod_rewrite.c>
   RewriteEngine On 
   RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Comment

laravel 9 remove public from url

//Laravel 9 Just Add these code in .htaccess file
RewriteCond %{REQUEST_URI} !^/public($|/)
RewriteRule ^(.*)$ public/$1 [L]
Comment

PREVIOUS NEXT
Code Example
Php :: how to store api response to avariable in phpp 
Php :: how to use cornjob on live server in laravel 
Php :: if data come from foreach loop and if there are same value then sum of this same value and pass it to variable in php 
Php :: setup wp cron from external / cpanel cron service 
Php :: php foreach show only 4 
Php :: How to increase the WordPress Multisite Network limit for Maximum Filesize Upload? 
Php :: powerpack add custom image size 
Php :: public function __sleep() and __wakeup() 
Php :: verta sample jalali laravel problem return object 
Php :: print array blade laravel 
Php :: php list all files in directory and subdirectories 
Php :: php registration form and login in same page 
Php :: php validate email 
Php :: spatie media library 
Php :: php mysql row to json 
Php :: laravel authentication 
Php :: stripslash 
Php :: how to host a php server 
Php :: how to refresh migration in laravel without losing data 
Php :: User::factory()-create( 
Php :: declare variable in view for loop laravel 
Java :: import math java 
Java :: change java version command line debian 
Java :: string to date conversion java 
Java :: spigot title 
Java :: Card view implement 
Java :: how to get an array as input in java 
Java :: gravatar default 
Java :: how to print a 2d array in java 
Java :: servlet redirect java 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =