original url is one of the following:
example.comexample.com/index.phpexample.com/index.php?c=lorem
if example.com - nothing should be done
if example.com/index.php - it should be visible as example.com and here is my code - works fine:
RewriteEngine ON
RewriteRule ^index\.php/?$ https://%{HTTP_HOST}/ [NC,R=301]
RewriteRule ^/?$ index.php [L]
if example.com/index.php?c=lorem it should be visible as example.com/lorem
and lorem should be accessible by php in both cases:
- if a user type
example.com/index.php?c=loremor - a user type
example.com/lorem
pls help