Here is my .htaccess to rewrite public/index.php I'm using the Laravel php framework.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} /(code|tmp) [NC]
RewriteRule ^ - [L]
RewriteRule ^((?!public/).*)$ public/$1 [L,NC]
</IfModule>
Here the folders 'code' and 'tmp' can be accessed like normal.
If I add a set of nested folders, and add the default Laravel htaccess to remove the public/index.php
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
It doesn't work inside the nested folder.
It works good if I don't have the firstly given .htaccess in the root directory. Once I given my .htaccess it is not working.
Is the .htaccess in the root directory causing effect to the sub folder ?
If so , how can I fix that
Note : This is the question where I got .htaccess previously