Remove parameters from url in PHP

In case you have a url and you want to remove all parameters from it use this:

This regex directive means – replace everything

Read more