Skip to main content

I tried to solve this problem simply by making a .htaccess file. This file configures the apache server and solves the problem. Simply put this code in a file named '.htaccess' and save it in the root folder.

<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> 
  

I tried to solve this problem simply by making a .htaccess file. This file configures the apache server and solves the problem. Simply put this code in a file named '.htaccess' and save it in the root folder.

<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 
 

I tried to solve this problem simply by making a .htaccess file. This file configures the apache server and solves the problem. Simply put this code in a file named '.htaccess' and save it in the root folder.

<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> 
 
Source Link
Karan Dhillon
  • 1.3k
  • 1
  • 7
  • 14

I tried to solve this problem simply by making a .htaccess file. This file configures the apache server and solves the problem. Simply put this code in a file named '.htaccess' and save it in the root folder.

<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