Colour => number map it PHP side. Ignore the 1-3.
Code:
RewriteEngine on
RewriteRule colours/([^/]+)/?$ colours.php?s=$1
PHP side:
PHP Code:
<?php
if (isset($_GET['s']))
{
switch ($_GET['s'])
{
case 1:
case 'red': // PHP can switch on strings.
print 'provided "red"';
break;
case 2:
case 'green':
print 'provided "green"';
break;
//. . .
}
}
You can use a db or array as well. The idea is that you can match either the number or the corresponding name. If you only have RGB, I'd suggest leaving it as just a switch since that'll make it easier.
Now you should be able to use colours/blue or colours/2 and result in the same output.
Try that.