I have this code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule . /index.php [L]
</IfModule>
When I type http://localhost/path
I'd like it to redirect to: http://localhost/path/
I would like to do this without changing my code base:
In the above code when you put http://localhost/path
it redirects to index.php (I want to keep this).
I want my code to be flexible to accept any URL changes and to accept both http and https.
I also want it to detect the folder that my site is in case it changes folder. Example: From localhost/
to localhost/www/site
And I do not want it to ignore the path of existing files and directories.
How to do this?