you really need to change the web server to have public as the root folder and not try to work around it.
my betting is also that domain.com/.env will reveal some interesting information
Hi there, I have laravel based website and if you visit it, it shows you clean urls as follows
domain.com/site/myfoldername
however the same page can be also accessed via the following url
domain.com/public/index.php/site/myfoldernname
I need to 301 redirect
domain.com/public/index.php/site/myfoldernname
to
domainl.com/site/myfoldername
my current htaccess in root (public_html)
#AddHandler application/x-httpd-php55 .php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
my current htaccess in laravel public folder
<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>
<FilesMatch "^.*?style.*?$">
SetHandler php5-script
</FilesMatch>
Please or to participate in this conversation.