php - First $_GET parameter dosn't work in .htaccess

I'm using .htaccess on my dashboard and I'm using it to short and organize my URL so for that i try to add some $_GET parameters in .htaccess file and when i checked for the output parameters i get the second , third and forth parameter but not the first one
This is URL before using htaccess :
http://example.com/dashboard?param1=first¶m2=second¶m3=third¶m4=forth
This is URL after using htaccess :
http://example.com/dashboard/first/second/third/forth
The output from printing $_GET :
array(4) { ["param1"]=> string(3) "php" ["param2"]=> string(6) "second" ["param3"]=> string(5) "third" ["param4"]=> string(5) "forth" }
I don't know why is first parameter is getting 'php' as a value instead of getting the value from URL
This is my .htaccess file :
RewriteEngine On
Options +FollowSymLinks
RewriteRule ([^\.]+)/$ index.php?param1=$1
RewriteRule ([^\.]+)/([^\.]+)$ index.php?param1=$1¶m2=$2
RewriteRule ([^\.]+)/([^\.]+)/([^\.]+)$ index.php?param1=$1¶m2=$2¶m3=$3
RewriteRule ([^\.]+)/([^\.]+)/([^\.]+)/([^\.]+)$ index.php?param1=$1¶m2=$2¶m3=$3¶m4=$4
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: trying to access array offset on value of type bool
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.