Htaccess - different when logged in

Hi I have a login system for members only.

Users login at index.php
When a users is correctly logged in it will redirect to main.php in same folder.
And uses this → main.php?page=start

in my htaccess I have this:

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ main.php?page=$1 [L]

It works but I want to add when in index.php
I would like to check if there is a variable set - index.php?color=red
but instead of showing the url I want the variable to be like this: /red
so if I got to my domain for example.com/red - > I will get a color variable that is ‘red’.

I tryed this but I think the confuse each others =)

RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?color=$1 [L]
RewriteRule ^(.*)$ main.php?page=$1 [L]
Sponsor our Newsletter | Privacy Policy | Terms of Service