I have a directory named view. Within there I have index.php.
Currently, users have to go to mydomain.com/account/new/prescriptions/view/index.php?id=61312 to view the data.
How can i use .htaccess to change this to mydomain.com/account/new/prescriptions/view/61312
I have tried the below:
# Specific rewrite for account/new/prescriptions/view
RewriteRule ^(account/new/prescriptions/view)/(\d+)$ $1 [END]
# Append .php extension for other requests
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^(.*?)/?$ /$1.php [END]
However, this changes the url to from index.php?id=61312 to index?id=61312
You may use this code inside
view/.htaccess: