How to change the link from
view.php?id=77
to view/77
or view/77.html
?
Asked
Active
Viewed 15 times
0
Ninoo
- 35
- 6
-
The RewriteRule/regex placeholder for numbers is `\d+` – mario Feb 03 '19 at 03:33
-
1The "folder" style, is referred to as a [RESTful URI](https://en.wikipedia.org/wiki/Representational_state_transfer). It uses the htaccess file to rewrite requests to a routing file, typically `index.php`, Where PHP then parses the [`$_SERVER['REQUEST_URI']`](https://secure.php.net/manual/en/reserved.variables.server.php) and then generates a response to send to the client. There are several libraries for PHP available that provide the parsing functionality. You would then update your links in the view pages accordingly. – Will B. Feb 03 '19 at 03:34
-
Yees thank you guys so much ❤ – Ninoo Feb 03 '19 at 03:36