Hi,
I want to redirect and then rewrite my URL (internal forwarding) so that it doesn't show the php extension as well it doesn't show the ?, = and & in the URL.
The solution for that was provided for a single script in the question
https://www.experts-exchange.com/questions/28969579/Redirect-and-Rewrite-URL-using-htaccess.html by Terry Woods.
In this question i want to achieve the same but instead of adding Rewrite Rules for every script individually i just add one generic rule which applies to all the scripts. Below is the example.
The URL
http://localhost/portal/SCRIPTNAME.php?var1=val1 be redirected i.e. show in address bar as
http://localhost/portal/SCRIPTNAME.php/var1/val1 and internally it is forwarded to the actual URL
http://localhost/portal/SCRIPTNAME.php?var1=val1
The
SCRIPTNAME.php can be any name for ex. "error.php" or "admin.php" etc. as well as there can be multiple $_GET variables in a single URL for ex:
http://localhost/portal/SCRIPTNAME.php?var1=val1&var2=val2&val3=val3 must be shown in address bar as
http://localhost/portal/SCRIPTNAME.php/var1/val1/var2/val2/val3/val3
Also there is no pattern in the naming of the $_GET variables or values.
Kindly let me know if any more information is required
Thanks in advance