I am developing a website using PHP. My .htaccess has this rewrite rule:
RewriteEngine On
RewriteRule ^book/([^/]*)\.html$ book.php?title=$1 [L]
So, the URL that looked like this: www.example.com/book.php?title=title-of-the-book turns into www.example.com/book/title-of-the-book.html
In a specific case, from another page on the site, I want to link to such pages: www.example.com/book.php?title=title-of-the-book?myfield=1 which then turns into www.example.com/ book / title-of-the-book.html? myfield = 1.html
Being one, I cannot use GET variables using the usual PHP method
$variable = $_GET['myfield']
How to solve this problem?
source
share