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

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 :: php file upload error 
Php :: Flutter Error - Migrate to android studio - MAC OS 
Php :: flutter network image svg 
Php :: laravel get request check 
Php :: strcasecmp php 
Php :: select query in php 
Php :: get count laravel 
Php :: time php 
Php :: php replace all spaces with dashes 
Php :: php delete json object from a collection object 
Php :: date_sub laravel 7 
Php :: save an image use php 
Php :: mac address php 
Php :: change key with the value php 
Php :: Str laravel 9 
Php :: php required 
Php :: create a wp plugin 
Php :: using php, how to create a folder in another folder 
Php :: Undefined index: id 
Php :: laravel merge collections 
Php :: get text field value in php 
Php :: current time input field in laravel form 
Php :: applying multiple order by in codeigniter 
Php :: get current time in php 
Php :: how to use plugin shortcode in wordpress template 
Php :: check if object has method php 
Php :: Yii::app()-request-get yii1 
Php :: sum of the array elements in php 
Php :: laravel event generate 
Php :: laravel observer check if field changed 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =