I have the following rule:
RewriteRule ^some_text/([^/]+)/([^/]+)/ name_folder/a=?&b=?&
If I want to add more parameters after the third slash I want to add ?
else the parameter is not considering. Just like http://some_domain/some_text/a/b/?c=123&d=123
and it is not working when I use like this http://some_domain/some_text/a/b/c=123&d=123
the c
and d
parameters are not working.
It is still unclear what you actually want to achieve precisely, your question stays vague despite my effort in the comments to get something more specific from you...
However I could imagine this is what you might be looking for:
RewriteEngine on
RewriteRule ^/?some_text/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ /folder/index.php?a=$1&b=$2&c=$3&d=$4 [L]
This will internally rewrite
to the internal resource
So your "clean looking" URLs would follow that scheme:
http://example.com/some_text/$a/$b/$c/$d
There are other options, this is just a suggestion. It is simple and robust, but requires to always have exactly 4 arguments present. Take it as a suggestion and work from there to find a solution for your specific situation which is still unclear to us.