I need to continue this indefinatly in length without writing it out everytime.
Is there a way to achieve this?
RewriteRule ^(\w+)/?$ index.php?page=$1 [QSA]
RewriteRule ^(\w+)/(\w+)/?$ index.php?page=$1&$1=$2 [QSA,L]
RewriteRule ^(\w+)/(\w+)/(\w+)/?$ index.php?page=$1&$1=$2&$2=$3 [QSA,L]
So all the way through $1=$2 then $2=$3 so page=blog&blog=article&article=date&date=2012
My PHP then takes this and runs analysis on this. So could be as as $1 -> $11 Long URL I know means that I can still enable adding.
AAA.com/blog/article/date/2012/?colour=blue
Not as such. To get an replacement
$5placeholder, you do need a match group.One could of course optionalize it group-wise:
But then you had a few
&=&=&=trailing for absent entries. Usually it should result in an empty$_GET[""], but PHP even ignores that. So, might be an option. I don’t feel it’s a more readable or concise RewriteRule though.