10 Jul 2021, 04:33

No problem @Sanjeev , it's a pleasure try to give a small help.
Today I'm adding some new informations: a small guide on how to rewrite URL, just below.

How to remove public folder and also index.php from the UVdesk URL

In the main UVdesk root folder you need have or add an .htaccess file with the following rules:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /public/$1 [L,QSA]

In some occasion I discovered my UVdesk installation was showing index.php in the URL, for hide that I added some rules in the .htaccess file, this time inside the public folder.

In the public folder you need have an .htaccess file where you may want add

RewriteEngine On
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

Also if you want force HTTPS you can add:

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

In the existent .htaccess file inside the public folder you should already also have the following code:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ ./index.php/$1 [QSA,L]
    RewriteCond %{HTTP:Authorization} ^(.*)
    RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
</IfModule>

Now your installation should work without public and without index.php showed in the URL.