Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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

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 get end of array in foreach php 
Php :: disable cors laravel 
Php :: laravel set innodb scema builder 
Php :: woocommerce php same skus 
Php :: echo two variables same line php 
Php :: Laravel: Foreign id does not have default value 
Php :: php header accept post request from same domain 
Php :: unable to composer require apidoc yii2 
Php :: laravel count soft delete data 
Php :: generate rand password php 
Php :: ubuntu PHP Installation broken - shows strange php code as response 
Php :: wp php get total product order quantity 
Php :: rename image file using post id in wordpress programmatically 
Php :: joomla k2 api 
Php :: php array key value print 
Php :: Laravel Exclude URI from csrf token verification 
Php :: exists:categories,id except a value laravel 
Php :: validate unique or equal 
Php :: set php variabe with javascript loca storage 
Php :: backend/web/index.php when deploying 
Php :: php curl fail verbosly 
Php :: jquery ui sortable tables php mysql 
Php :: Obtener rol de usuario registrado en WordPress 
Php :: add element to this array 
Php :: WP Admin Bar Dev Links 
Php :: bitnami lightsail PHP Fatal error: Out of memory (allocated 
Php :: CausesActivity trait 
Php :: php firebase sdk cloud messaging initialization 
Php :: add document by api php 
Php :: how to add posts to php 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =