I just installed SSL certificate on the server.
Current URL: www.example.com
Current working htaccess file:
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule ^(.*)$ public/ [L]
it is redirecting to public/index.php.
but problem is when I am adding HTTPS code in htaccess then this public/index.php is not working.
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^/?(.*) https://www.example.com/$1 [R]
When I am removing public redirection part then HTTPS is working but not pointing to public/index.php.
How can I combine these rules so it will redirect to public/index.php with https url.
PS: public/htaccess
ReWriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
Please help!
Thank You