I am using PHP, Laravel 8 Framework, and cPanel for my website. What I am trying to do is something like this.
Redirecting Routes from
http://example.com/example.com/public/
http://example.com/example.com/public/about
http://example.com/example.com/public/contact
.
.
// more
to
https://example.com/
https://example.com/about
https://example.com/contact
.
.
// more
I have the .htaccess file in the domain root public_html folder.
.htaccess file
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^example.com$
RewriteCond %{REQUEST_URI} !public/
RewriteRule (.*) /example.com/public/$1 [L]
Please guide me if I had done something wrong.