0

I have an url localhost/viewprofile.php?username=johngood23 and I want it to rewritten as johngood23.localhost using htaccess.

This is what I tried but failed to do so. RewriteCond %{HTTP_HOST} ^www\.localhost\.com [NC] RewriteRule ^(.*)$ viewprofile.php?username= $1

Jonathan Eustace
  • 2,469
  • 12
  • 31
  • 54

0 Answers0