Here the request code itself all works fine when access to the page is of the type site.com/profile?id=123 or site.com/123 but gives an error when access is of the form of site.com/idn123
Here is the code that pulls the user id
if (isset($_GET['id'])) {$id =$_GET['id']; } else { exit("Error 1 !");} if($id == 0) { exit("<p>Bad URL</p>"); }
When requesting site.com/idn123, it gives a bad url error. In .htaccess, this is what is entered for changing to idn
RewriteEngine on RewriteRule ^([a-zA-Z0-9_-]+)$ profile?id=$1 RewriteRule ^([a-zA-Z0-9_-]+)/$ idn?id=$1 RewriteRule ^idn([0-9]+)$ profile?id=$1
Tell me what's wrong and why does it give an error? What needs to be fixed?