I want to retireve page url using php but I would like some parts removed
<?php print("http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); ?>
Example: http://url.com/questions/page/112/
Result: http://url.com/page/112/
I would like to remove questions/ within the url. How would I do this?
1 Answer