Ben URI'lerinin iki tip ayıklamak için normal bir ifade gerekir
http://example.com/path/to/page/?filter
http://example.com/path/to/?filter
Temel olarak, her iki durumda da ben bir şekilde izole ve dönüş gerekir
/path/to
ve
?filter
That is, both /path/to ve filter is arbitrary. So I suppose I need 2 regular expressions for this? I am doing this in PHP but if someone could help me out with the regular expressions I can figure out the rest. Thanks for your time :)
EDIT: Yani sadece clearify isterseniz örneğin
http://example.com/help/faq/?sort=latest
I want to get /help/faq ve ?sort=latest
Başka bir örnek
http://example.com/site/users/all/page/?filter=none&status=2
I want to get /site/users/all ve ?filter=none&status=2. Note that I do not want to get the page!