I am trying to rewrite the following 3 URLs to translate into the correct pages.
highscore.php is in my main directory
www.domain.com/clan/
www.domain.com/highscore.php
www.domain.com/clan/Halos
www.domain.com/highscore.php?clan=Halos
www.domain.com/clan/Halos/Cooking
www.domain.com/highscore.php?clan=Halos&view=Cooking
I have the following in my .htaccess:
RewriteEngine On
#RewriteBase /
RewriteRule ^clan/([^/]*)$ /highscore.php?clan=$1&view=$2 [L]
This successfully maps the following URL:
www.domain.com/clan/Halos
to
www.domain.com/highscore.php?clan=Halos
The following URL goes to the highscore.php page with a null 'clan' parameter
www.domain.com/clan/
is mapping to
www.domain.com/highscore.php?clan=
I'm trying to get it to map to
www.domain.com/highscore.php
When I go to
www.domain.com/clan/Halos/Cooking
It only recognizes the first parameter 'Halos' and not the second one 'Cooking' ? It takes me to:
www.domain.com/highscore.php?clan=Halos
Very confused, I need some direction to what I'm doing right and/or wrong.