0

Basically, I am building a profile page in that I am passing a particular user value from DB to the page using the get method. It looks like www.example.net/index.php?user=xyz. It will take the XYZ value from DB and display the relevant data in index.php

Now all I want to achieve is a clean URL something like www.example.net/xyz.

Is there any way we can send the get value directly without mentioning the get username, question mark & equals in the URL (www.example.net/xyz)

Thanks

  • Search in this site or google for "How to crete seo url with htaccess" – DLK Apr 04 '23 at 05:26
  • Using mod_rewrite alone is only one possible solution to the question, and NOT the most common or practical one. It's unfortunate that so many of this duplicate question are being pointed to the same wrong answer by the moderators here. The most common way that you will see pretty links comes from MVC frameworks using routing, which does use mod_rewrite, but only to redirect all requests to the same php file (typically index.php), then uses $_SERVER['PATH_INFO']. See: php.net/manual/en/reserved.variables.server.php – Adam Winter Apr 12 '23 at 05:49

0 Answers0