Comments on: How to Generate User Friendly URL using .htaccess and PHP https://www.codexworld.com/how-to/generate-user-friendly-url-using-htaccess-php/ Web & Mobile App Development Company Sun, 02 May 2021 20:57:37 +0000 hourly 1 By: Marcelo Albuquerque https://www.codexworld.com/how-to/generate-user-friendly-url-using-htaccess-php/comment-page-1/#comment-139516 Sun, 02 May 2021 20:57:37 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=3187#comment-139516 Thanks for the help.

My suggestion is to remove the first value from array return, in this case: “$uriSegments[0]”. This value is empty in all requests.

We can use the array_shift function to remove this value:

$uriSegments = explode(“/”, parse_url($_SERVER[‘REQUEST_URI’], PHP_URL_PATH));
array_shift($uriSegments);

Now, the “$uriSegments[0]” returns “codex”

]]>
By: Arun https://www.codexworld.com/how-to/generate-user-friendly-url-using-htaccess-php/comment-page-1/#comment-70977 Sun, 02 Dec 2018 08:53:44 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=3187#comment-70977 How this htaccess works in windows server?Please give one example for user friendly url.

]]>
By: CodexWorld https://www.codexworld.com/how-to/generate-user-friendly-url-using-htaccess-php/comment-page-1/#comment-64621 Thu, 20 Sep 2018 20:14:37 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=3187#comment-64621 In reply to Rahul M.

Yes.

]]>
By: Rahul M https://www.codexworld.com/how-to/generate-user-friendly-url-using-htaccess-php/comment-page-1/#comment-64587 Thu, 20 Sep 2018 08:23:53 +0000 https://www.codexworld.com/?post_type=how-to-guides&p=3187#comment-64587 will it work on HTTP site also?

]]>