Hi. I dont specifically have an error, I would like to know how do transform $_GET urls like ?id=19 to /id/19/. Is it there a way to do this?
To clarify, it would normally look like /example.php?page=5 but i want it to look like /example/page/5.
Thank you!
You would use .htaccess to do that
4 Likes
This post should help
.htaccess Guide!
htaccess file allows you to set server configurations for a specific directory. This could be the root directory for your website or an /images or /downloads directory. It is used on the Apache web server. It can also be used on a handful of other web servers…
I’m going to give you a mini-guide on htaccess. Hope you find it useful!
Warning: BEFORE you edit your .htacces file, store a copy of it in case you mess it up!
Redirect to https
RewriteEngine On
RewriteCond %{HTTPS} …
This specific example I belive
RewriteEngine On
RewriteCond %{QUERY_STRING} blog=(.+) [NC]
RewriteRule ^(.*)$ http://www.example.com/Blog-Details.php/%1? [R=301, NC, L]
4 Likes